0
votes

Can anyone help me with the conditional formatting of the attached. I need to be able to type in the width and the drop in the separate cells to the table and the corresponding row and column highlight to cross over on the number needed.

I'm unsure of the formula needed but in short i need it to do the following: if row 4 col O is between 150 - 614 col D will highlight if row 4 col P is between 100 - 1014 row 4 will highlight and so on for the others.

attached image

2
Split row 3 into two separate rows with your top row being your lower limit and your bottom row being your upper limit and you should be about to do a horizontal lookup or an index/match. If you could do the same thing with column C and place the limits side by side, then your could do a vlookup or index match vertically there. Are you allowed to reformat you table slightly?Forward Ed

2 Answers

1
votes

example of reformatted table and results

If you are allowed to reformat your table slightly, you could use the following formula as your conditional formatting check. I placed the formula in all cells of the table so you can see what your two values evaluate to on the table. If you cannot split your table headers apart slightly then you need to modify the formula to ripping out the numbers from the string in order to make the comparison.

This is the formula I placed in all cells starting with top left cell in D5

=AND(AND($O$5>=D$3,$O$5<=D$4),AND($P$5>=$B5,$P$5<=$C5))

If you are stuck with a having to use the strings in your header and need something that looks like this:

String Example

then use following in cell D4 so you can see how it evaluates and copy it into your conditional formatting for a new rule:

=AND(AND($O$4>=--LEFT(D$3,FIND("mm",D$3)-1),
$O$4<=--MID(D$3,FIND("-",D$3)+2,FIND("m",D$3,FIND("-",D$3))-FIND("-",D$3)-2)),
AND($P$4>=--LEFT($C4,FIND("mm",$C4)-1),
$P$4<=--MID($C4,FIND("-",$C4)+2,FIND("m",$C4,FIND("-",$C4))-FIND("-",$C4)-2)))

NOTE: When setting up your conditional formatting rules, have all your entries selected and make sure the top left cell of your selection is the one with the whitish background.

0
votes

Base your CF rule for D4:M11 on this formula.

  range_labels_CF_rule


I'll edit this answer in a couple of days to put the formula into a code block.