Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Searching for text in a sheet and highlighting it if found

Status
Not open for further replies.
Mar 6, 2003
157
JO
I have a sheet with descriptive text in column G. I would like to be able to search for a specific word in all possible rows with a wildcard; for example anything with the word 'travel*' in it.

If the text containing 'travel*' is found in column G, I would like the entire cell highlighted and bolded. I would also like anything in the adjacent cell to the left (column F) of that row bolded.

Is there an easy way to parse through text with VBA and perform the above actions?

Any help would be much appreciated.

Regards,
Shawn
 
Hi,

I'd put the "secret word" in a fixed cell.

Then use Condirional Formatting to perform whatever shading or emphasis you want base on the "secret word."

Skip,

[glasses] [red]Be advised:[/red] The dyslexic, agnostic, insomniac, lays awake all night wondering...
"Is there really a DOG?" [tongue]
 
Hi Skip,

Makes sense. I know I failed to mention this, but I also have the number of hours in each corresponding cell in column F. How do I tally up the total hours for only those rows which were highlighted as a result of containing the text 'travel*' in the corresponding row in column G?

Thanks so much for the response.

Regards,
Shawn
 
You can use SUMPRODUCT or SUMIF functions.

Skip,

[glasses] [red]Be advised:[/red] The dyslexic, agnostic, insomniac, lays awake all night wondering...
"Is there really a DOG?" [tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top