I have a spreadsheet of about 1000 rows and want to write a macro that searches each row for the word "Sum" and then changes column next to it to "Sum Found". How do I create a VB code to search a cell for the word "Sum"?
The data in Cell A1 is either:
"Single" or "Sum" or "Total Sum"
Cell A2 looks like this:
=IF((ISERROR(SEARCH("Sum",A1))=FALSE,"SumFound","")
2007-10-23
01:48:57
·
3 answers
·
asked by
Capt BloodLoss
2
in
Computers & Internet
➔ Programming & Design
It said something about the fact that I should use the Application.WorksheetFunction. thing in VB, but I can't get it to work
2007-10-23
01:54:02 ·
update #1
Thanks for the answers so far, but another problem is creeping up namely spaces. The guy that gave me the worksheets has spaces in front of the sum, like " Sum" in a lot of the of the cells and the amount of spaces are not consistent. How do I get around it with a Macro?
2007-10-23
20:22:33 ·
update #2