tab colour depending on search results - is this possible?

fry

Active Member
Joined
Apr 25, 2007
Messages
411
Hi all

Can anyone suggest a way of adding a button that when clicked searches through the worksheets and displays all the sheets that have the same colour tab (like doing a CTRL-F to find something).....or is this a bit too optimistic??

Also with reference to the above is it possible to add some code to my existing worksheet code to search through that particular worksheet and change the tab colour based upon the findings (eg if "ABC" is found then tab is blue or if "Mr a n other" is found tab is green??

I guess I might be getting a bit adventurous here but I wish I could get all this out of my head..................thanks :)
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
I forgot to add that I'd tried the obvious way of doing it by recording a macro and pressing CTRL-F manually then looking at the code but it creates a macro with nothing in it?!?!? :(
 
Upvote 0
Further to the above I've just tried doing it again using only the keyboard (just in case mouse clicks aren't recognised) but alas the macro is still empty!? :(
 
Upvote 0
Just to be a bit clearer the second part of my question would be...

If any of the cells in B11 to B13 in the current worksheet contain the letters "BOC" then make the worksheet tab blue.

Is this possible to code? :)
 
Upvote 0

Forum statistics

Threads
1,213,546
Messages
6,114,255
Members
448,556
Latest member
peterhess2002

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top