Conditional Formatting

twmoore

New Member
Joined
Apr 13, 2003
Messages
2
Help please. I am trying to highlight all cells in a large spreadsheet that contain the same certain text value. For example all cells contain text such as "B6 - A5", or "C7 - B4" etc. (These are not cell references, they are softball team designations) I am trying to highlight all cells that contain for example the text "B6". Nothing I've tried seems to work.
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Aladin, just got home and sat down and thought I'd try something before tackling the VBA. I altered your conditional formatting formula to:

=SEARCH(TEXT($C$2,100),A1)

where the user inputs the text to find and then highlight in cell C2. Woiks.

Only downside is that I didn't learn anything new about VBA, although I will have to tackle it if I want a macro to scroll through the range to find and highlight each occurrence in order. Maybe manana. :rolleyes:

Amazingd, thanks for your formulas. I tried your FIND +1 and +4, it works fine as long as the first argument is in the form of the "text" you're looking for, but doesn't work if it's a cell reference. I got it to work with the TEXT argument, same as I used above for Aladin's SEARCH formula:

=FIND(TEXT($C$2,100),A1)=1
...and
=FIND(TEXT($C$2,100),A1)=4

I believe Aladin's is more versitile, though, since it is not limited to the position of the text within text.

Again, thanks Aladin and amazingd.[/i]
 
Upvote 0

Forum statistics

Threads
1,221,691
Messages
6,161,322
Members
451,696
Latest member
Senthil Murugan

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