Hello to everyone, how are you today ? I am little bit sad (or mad) because I am stuck at relatively easy task (but not for me now as I discovered) and cant find nothing useful on net , so please help:D
I have this macro for searching text in whole column and then add answer to next column - row. The problem is that the search range is only for specific column (now only for C1 to its end), but I want to search the text for any active column that I will select. So I need to know how to define, that the range will be dynamic or general for all columns that I select to search in, not only column C or some other. Hope I explain it clear.
Sub FindWord()
'ZADANIE DO SESDRU
Dim FindString As String
Dim FindCell As Range
FindString = "Need to be added to SESDR"
myreplace = "Add to SESDR"
If FindString = "" Then Exit Sub
For Each FindCell In Range(ActiveSheet.Range("C1"), ActiveSheet.Range("C65536").End(xlUp)).Cells
If InStr(FindCell, FindString) > 0 Then FindCell.Offset(, 1) = myreplace
Next FindCell
Bookmarks