Conditional formatting with an IF function

Indaxt

New Member
Joined
Sep 15, 2022
Messages
8
Office Version
  1. 365
Platform
  1. Windows
Good evening everyone, I have been trying for a while to create something and I just can't make it work! I have tried as a table and not as a table. I have tried with conditional formating with the IF function but no luck either.

In the example below we have several text values in column B with different brands followed by numbers. I would like column C to show a text based on column B content.
Example: If B1 and B4 contain "Leroy..." I want column C to give me for both C1 and C4 "LEROY".

I honestly don't know how to get around this problem. I hope it's something really simple and I'm just being thick!

Thank you for your time.

ABC
1Leroy Merlin 3123124
2Primark 13324
3Primark 7723
4Leroy Merlin 22220
5Mango 338972
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
try this:

Mr Excel Questions 73.xlsm
ABC
1ABC
21Leroy Merlin 3123124Leroy
32Primark 13324 
43Primark 7723 
54Leroy Merlin 22220Leroy
65Mango 338972 
Indaxt
Cell Formulas
RangeFormula
C2:C6C2=IF(ISNUMBER(FIND("LEROY",UPPER(B2))),"Leroy","")


If you're trying to conditional format column C then conditional format formula for cell C2 would be:
Excel Formula:
=ISNUMBER(FIND("LEROY",UPPER(B2)))
 
Upvote 1
Solution
Good evening @awoohaw and thank you very much for your quick response!

It's working perfectly in the cells and the conditional format is working if I try to apply colors or borders but, can I conditional format that column to give me "Leroy" or "Primark" in those cells or can I only format it for colors/borders/...? Is it possible?

Sorry, I feel like this is such a newbie question.

I appreciate your time man. Thanks again!
 
Upvote 0
You're welcome. You will need to do individual rules for each condition.
I only did colors, you update the CF as you see fit.

Mr Excel Questions 73.xlsm
ABC
1ABC
21Leroy Merlin 3123124Leroy
32Primark 13324Primark
43Primark 7723Primark
54Leroy Merlin 22220Leroy
65Mango 338972 
Indaxt
Cell Formulas
RangeFormula
C2:C6C2=IF(ISNUMBER(FIND("LEROY",UPPER(B2))),"Leroy",IF(ISNUMBER(FIND("PRIMARK",UPPER(B2))),"Primark",""))
Cells with Conditional Formatting
CellConditionCell FormatStop If True
C2:C6Expression=ISNUMBER(FIND("PRIMARK",UPPER(B2)))textNO
C2:C6Expression=ISNUMBER(FIND("LEROY",UPPER(B2)))textNO
 
Upvote 1

Forum statistics

Threads
1,224,823
Messages
6,181,182
Members
453,021
Latest member
Mohamed Magdi Tawfiq Emam

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