Can a Conditional Formula highlight cell G2 in range (G1:H2) that contains value 32? Where two cells values are combined into one cell?

arthurz11

Board Regular
Joined
Nov 9, 2007
Messages
158
Office Version
  1. 2021
Platform
  1. Windows
Excel.png
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
How about
Excel Formula:
=ISNUMBER(SEARCH(" 32-"," "&G1))
 
Upvote 0
Solution
Yes, CF can do that.
Book1
ABCDEFGH
11100AB1-A100-B
2320CD32-C0-D
Sheet1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
G1:H2Expression=ISNUMBER(SEARCH("32",G1))textNO
 
Upvote 0
Yes, CF can do that.
Book1
ABCDEFGH
11100AB1-A100-B
2320CD32-C0-D
Sheet1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
G1:H2Expression=ISNUMBER(SEARCH("32",G1))textNO

It didn't quite worked. Notice I changed the cell A1 value to 3. Using the conditional formula that you wrote, it now highlights cell G1 and G2. Both cells have a number 3. So the formula checks to see if it has a 3. Weather it's 3,000, 300, 32, or a 3 it is highlighted. How can I revised your formula so it will only highlight cell G2 that has the value 32, even it there's another cell that has a 3 value?
 

Attachments

  • Excel 2.png
    Excel 2.png
    72.5 KB · Views: 5
Upvote 0
Did you try the formula I suggested?
 
Upvote 0
It didn't quite worked. Notice I changed the cell A1 value to 3. Using the conditional formula that you wrote, it now highlights cell G1 and G2. Both cells have a number 3. So the formula checks to see if it has a 3. Weather it's 3,000, 300, 32, or a 3 it is highlighted. How can I revised your formula so it will only highlight cell G2 that has the value 32, even it there's another cell that has a 3 value?
I see the formula you are actually using is only searching for "3" and not "32", but perhaps give Fluff's formula a try as it will only highlight 32, and not any larger numbers that have 32 in them.
Did you try the formula I suggested?
 
Upvote 0
I doubled check to be certain. I used this one =ISNUMBER(SEARCH(" 32-"," "&G1)) and nothing was highlighted. Then I used someone elses formula =ISNUMBER(SEARCH("32",G1)) and it highlighted cell G2. But when I changed cell A1 to 3 the formula =ISNUMBER(SEARCH("3",G1)) highlighted cells G1 and G2
 
Upvote 0
I used this one =ISNUMBER(SEARCH(" 32-"," "&G1)) and nothing was highlighted
It works for me.
Fluff.xlsm
ABCDEFGH
13321AB3-A321-B
232132CD32-C132-D
Data
Cell Formulas
RangeFormula
G1:H2G1=A1&"-"&C1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
G1:H2Expression=ISNUMBER(SEARCH(" 32-"," "&G1))textNO
 
Upvote 0
I doubled check to be certain. I used this one =ISNUMBER(SEARCH(" 32-"," "&G1)) and nothing was highlighted. Then I used someone elses formula =ISNUMBER(SEARCH("32",G1)) and it highlighted cell G2. But when I changed cell A1 to 3 the formula =ISNUMBER(SEARCH("3",G1)) highlighted cells G1 and G2
Changing the value in A1 shouldn't have changed the CF formula. So I can only imagine you had =ISNUMBER(SEARCH("3",G1)) the whole time and didn't notice.
 
Upvote 0
Sorry for the very late reply. It's even more frustrated trying to solve it and just having a tooth extracted. (for real). Just got back from the dentist. Anyway, I removed the text (letters) from the cells so I can explain myself more clearly. I used only numeric values. I just want to highlight the number 3 (“first value” before the hyphen) Or just want to highlight the number 32 (“first value” before the hyphen) Please view the image.

Excel 3.png
 
Upvote 0

Forum statistics

Threads
1,221,526
Messages
6,160,340
Members
451,637
Latest member
hvp2262

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