conditional format

smokenack

Active Member
Joined
Dec 12, 2003
Messages
351
I would like to conditionally format a range of cells so that if the value contained in a cell within the range appears in a cell in another defined range prefixed by the letter E the cell containing the value will be conditional formatted.

eg cell A1 = 4
cell B1 = E4
then cell A1 conditionally formatted.

thanks for looking

brain dead today

Nick
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
smokenack said:
I would like to conditionally format a range of cells so that if the value contained in a cell within the range appears in a cell in another defined range prefixed by the letter E the cell containing the value will be conditional formatted.

eg cell A1 = 4
cell B1 = E4
then cell A1 conditionally formatted.

thanks for looking

brain dead today

Nick

Try,

=LEFT(B1,1)="E"
 
Upvote 0
Thanks Brian,
That works fine for a single cell but I won't actually know where the corresponding cell will be within the other range.

eg A1 =4

E4 could be located anywhere within B1:B100 or not at all and this will regularly change

Nick
 
Upvote 0
smokenack said:
Thanks Brian,
That works fine for a single cell but I won't actually know where the corresponding cell will be within the other range.

eg A1 =4

E4 could be located anywhere within B1:B100 or not at all and this will regularly change

Nick

Maybe,

=SUMPRODUCT(--(LEFT(B1:B100,1)="e"))>=1
 
Upvote 0
thanks again but still not quite right as there will be several cells within B1:B100 that contain values prefixed by E.
Nick
 
Upvote 0
smokenack said:
I would like to conditionally format a range of cells so that if the value contained in a cell within the range appears in a cell in another defined range prefixed by the letter E the cell containing the value will be conditional formatted.

eg cell A1 = 4
cell B1 = E4
then cell A1 conditionally formatted.

thanks for looking

brain dead today

Nick

So if A1 = 5 then it doesn't meet the criteria, if B1 = E4
 
Upvote 0
no it doesn't, but if B52 = E5 it does.

I'll explain again.

A1:A100 contain the values 1 to 100 but not in numeric order.
B1:B100 contain the values 1 to 100 in a different order to A1:A100 and some are prefixed by E.
I want to conditionally format cells A1:A100 so that if the value of any cell within that range appears in B1:B100 prefixed by E the cell background is yellow.So if A5 = 6 and B52 = E6 then A5 is formatted.

with =SUMPRODUCT(--(LEFT(B1:B100,1)="e"))>=1 if more than one cell in B1:B100 contains a value prefixed by E all the conditionally formatted cells turn yellow.

The best solution that I have arrived at is to link column C to column A, eg C1=(A1) etc and then in D1 have = VLOOKUP(C1,B$1:B$100,1,0) and then format A1 formula is =ISERROR(D1) etc dragged down. This works but isn't really a perfect solution for me.

Nick
 
Upvote 0
OK

it worked when I tested it.

What's the problem?

You need to use the formula for conditional format in A1 and then copy as required
 
Upvote 0

Forum statistics

Threads
1,213,552
Messages
6,114,278
Members
448,560
Latest member
Torchwood72

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