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

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result

Brian from Maui

MrExcel MVP
Joined
Feb 16, 2002
Messages
8,459
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"
 

smokenack

Active Member
Joined
Dec 12, 2003
Messages
351
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
 

Brian from Maui

MrExcel MVP
Joined
Feb 16, 2002
Messages
8,459
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
 

smokenack

Active Member
Joined
Dec 12, 2003
Messages
351

ADVERTISEMENT

thanks again but still not quite right as there will be several cells within B1:B100 that contain values prefixed by E.
Nick
 

Brian from Maui

MrExcel MVP
Joined
Feb 16, 2002
Messages
8,459
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
 

smokenack

Active Member
Joined
Dec 12, 2003
Messages
351

ADVERTISEMENT

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
 

Dutchy

Well-known Member
Joined
Sep 18, 2004
Messages
560
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
 

Forum statistics

Threads
1,147,510
Messages
5,741,577
Members
423,668
Latest member
Audorin

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