Hello,
I am new to macros and this may be a simple question, hope you can help. PLEASE!! Thanks!
I'm trying to search for any string with a ":" from column M and move it to column D but start at a specific row based on a search i have. For example:
This finds kis emr and returns the row.
Dim rngSearch As Range, rngFound As Range
Set rngSearch = Range("a:a")
Set rngFound = rngSearch.Find(What:="kis emr", LookIn:=xlValues, LookAt:=xlPart)
This finds the ":" and moves it to the row found above but the problem is that when it finds every occurrence of ":" it overwrites the previous move. I need it to increment a row down before it finds the next ":" and move it.
If Range("m" & row).Value Like "*:*" Then 'if found then move it to d column
Range("d" & rngFound.row).Value = Range("m" & row).Value
'Range("d" & row).Value = Range("m" & row).Value
Range("m" & row).Value = ""
End if
I am new to macros and this may be a simple question, hope you can help. PLEASE!! Thanks!
I'm trying to search for any string with a ":" from column M and move it to column D but start at a specific row based on a search i have. For example:
This finds kis emr and returns the row.
Dim rngSearch As Range, rngFound As Range
Set rngSearch = Range("a:a")
Set rngFound = rngSearch.Find(What:="kis emr", LookIn:=xlValues, LookAt:=xlPart)
This finds the ":" and moves it to the row found above but the problem is that when it finds every occurrence of ":" it overwrites the previous move. I need it to increment a row down before it finds the next ":" and move it.
If Range("m" & row).Value Like "*:*" Then 'if found then move it to d column
Range("d" & rngFound.row).Value = Range("m" & row).Value
'Range("d" & row).Value = Range("m" & row).Value
Range("m" & row).Value = ""
End if