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

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.

fry

Active Member
Joined
Apr 25, 2007
Messages
411
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?!?!? :(
 

fry

Active Member
Joined
Apr 25, 2007
Messages
411
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!? :(
 

fry

Active Member
Joined
Apr 25, 2007
Messages
411
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? :)
 

Forum statistics

Threads
1,181,056
Messages
5,927,864
Members
436,573
Latest member
CMR237

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
Top