Search a word in the column
Closed
Nalini
-
Sep 15, 2011 at 06:37 PM
venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 - Sep 16, 2011 at 12:22 AM
venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 - Sep 16, 2011 at 12:22 AM
Related:
- Search a word in the column
- How to search for a word on a page - Guide
- Word apk for pc - Download - Word processors
- Number to text in word - Guide
- Tick symbol in word - Guide
- Backspace not working in word - Guide
1 response
venkat1926
Posts
1863
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
811
Sep 16, 2011 at 12:22 AM
Sep 16, 2011 at 12:22 AM
try this macro
there are two input boxes one for the word and one for t he relevant column number
there are two input boxes one for the word and one for t he relevant column number
Sub test() Dim j As Long, x As String, cfind As Range, add As String x = InputBox("type the word you want to find") j = InputBox("the column no. where the word appearss") With Columns(j) Set cfind = .Cells.Find(what:=x, lookat:=xlWhole) If Not cfind Is Nothing Then add = cfind.Address cfind.Offset(0, 1) = "exempt" End If Do Set cfind = .Cells.FindNext(cfind) If cfind Is Nothing Then Exit Do If cfind.Address = add Then Exit Do cfind.Offset(0, 1) = "exempt" Loop End With End Sub