I am looking to search through a worksheet, find a specific variable that is set from a user input. Find the value, then write a value to the right of field where the entry is found. I also need to do this as a loop, so wherever X is found in that list, write a value to the right of the search result, then find the next one and repeat.
This is what i have so far:
Set src = Workbooks.Open("\\a networkpath\excelfilename.xlsx")
cells.find(What:=myvariable. After:=Range("A1"))
g = activecell.offset(0, -1).value
Activecell.offset(0, -1).value = g & vbNewLine & Now() & " Email sent on this date"
Actvecell.offset)0,22).value = myvariable
So if i run this code it will find the search term once, since there is no loop and append as needed. It is just getting this to loop that i am having an issue. any help would be truly appreciated. I know this has to be an easy solution, however all the examples i have tried have not worked. thanks in advance for any and all help.
This is what i have so far:
Set src = Workbooks.Open("\\a networkpath\excelfilename.xlsx")
cells.find(What:=myvariable. After:=Range("A1"))
g = activecell.offset(0, -1).value
Activecell.offset(0, -1).value = g & vbNewLine & Now() & " Email sent on this date"
Actvecell.offset)0,22).value = myvariable
So if i run this code it will find the search term once, since there is no loop and append as needed. It is just getting this to loop that i am having an issue. any help would be truly appreciated. I know this has to be an easy solution, however all the examples i have tried have not worked. thanks in advance for any and all help.