search for a word(the word in cell C1) within column A and change font color. Each cell in column A
has a different sentence.
search for a word(the word in cell C1) within column A and change font color. Each cell in column A
has a different sentence.
Try this
Open up the VBA editor by hitting ALT F11![]()
Please Login or Register to view this content.
Insert a new module by hitting Insert - Module
Paste the macro into the empty sheet
Hit ALT F11 to get back to the worksheet.
Run the macro by going to tools-macro in Excel 2003 or the view ribbon in Excel 2007/2010.
Martin
@mice
Which part of the code must change if the strings are in other column(example:G:G, or H:M, OR L:L and P:P)?![]()
Regards
Fotis.
-This is my Greek whisper to Europe.
--Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.
Advanced Excel Techniques: http://excelxor.com/
--KISS(Keep it simple Stupid)
--Bring them back.
---See about Acropolis of Athens.
--Visit Greece.
The line containing Range(Cells(1, 1), Cells(Rows.Count, 1).End(xlUp)) would need to change with the second number in the two Cells objects changing to match the column number. E.g Range(Cells(1, 13), Cells(Rows.Count, 13).End(xlUp)) for Column M.
Thanks for the feed back Martin.
As i understand, this code can work only for one column. Not many columns. Correct?
The original question specified column A and my answer referred to this.
For many adjacent columns, you could use Range(Cells(1, 6), Cells(Rows.Count, 13).End(xlUp)) for columns F to M making the assumption that the number of rows to look at was defined by the bottom cell in column M.
Yes i know...The original question specified column A and my answer referred to this.
I don't have a same issue at all. I found this thread interesting and and it was an opportunity for me to learn new things.
I apologize if tired you with my questions
Thank you for all your answers.
No problem![]()
Happy New Year for you and your family!![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks