Using Index and Match in Conditional Formatting

frenne

New Member
Joined
Jul 16, 2014
Messages
7
I am trying to find a solution to colorize referral cells using conditional formatting.

I have two worksheets listing names in columns and dates in a row. The names are not sorted the same way in the different sheets.


I want one cell in one sheet to colorized if a correlating cell with matching name and date in the other sheet is more than 0.


The custom formula I have tried to use is:


=(INDEX('Resource Planning'!$A$3:$NG$100;MATCH($B33;'Resource Planning'!$A$5:$A$100);MATCH(GU$3;'Resource Planning'!$G$3:$NG$3)))


The other sheet is called Resource, Row 3 is Date and Column B is names and Column A in the sheet Resource.


The formula works by itself in a cell, but not in condtional formatting. Has anyone a smart solution for this?
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
The array argument in INDEX is A3:NG100 but lookup_array in the first MATCH is A5:A100.

I think this may be the cause of the error.

M.
 
Upvote 0
I tried changing it to A3 but I still get an error when I am trying to apply it in the conditional formating formula field.
It works fine in a cell, but not in the conditional formation.

Thanks,
 
Upvote 0
Your formula will just return the Value from the found cell rather than TRUE or FALSE.

Try this:

=(INDEX('Resource Planning'!$A$4:$NG$100;MATCH($B33;'Resource Planning'!$A$4:$A$100);MATCH(GU$3;'Resource Planning'!$G$3:$NG$3)))>0

Just noticed that your vertical array started in the same row as your Horizontal array (Headers?) changed both to start in A4.
 
Upvote 0
oops...

The second MATCH, also, is not correct

Try

=INDEX('Resource Planning'!$A$3:$NG$100;MATCH($B33;'Resource Planning'!$A$3:$A$100,0);MATCH(GU$3;'Resource Planning'!$A$3:$NG$3,0))

Hope this helps

M.
 
Last edited:
Upvote 0
It seems that you use ; as argument separator

So try this
=INDEX('Resource Planning'!$A$3:$NG$100;MATCH($B33;'Resource Planning'!$A$3:$A$100;0);MATCH(GU$3;'Resource Planning'!$A$3:$NG$3;0))

M.
 
Upvote 0
The last forumula works great (except in a cell. But as soon as I add it as condtional formatting it says it contains errors.

=INDEX('Resource Planning'!$A$3:$NG$100;MATCH($B33;'Resource Planning'!$A$3:$A$100;0);MATCH(GU$3;'Resource Planning'!$A$3:$NG$3;0))>0

Should these types of formulas not work with conditional formatting?
 
Upvote 0
Version 14 on a Mac.

I got it working now, but it gives me the wrong results.
Any other formulas I can use that might be even better?

Thanks,
 
Upvote 0
hmm...i'm afraid you have to use a formula exactly like this.

I have no experience with Excel for Mac but i think the formula should give you the correct results. Please, check the ranges.

It worked perfectly for me. (Excel 2010)

M.
 
Upvote 0

Forum statistics

Threads
1,214,976
Messages
6,122,539
Members
449,088
Latest member
RandomExceller01

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