Conditional formatting of one value in a row of numbers

49 Views Asked by At

I have a row E3:M3 with different numbers in each cell. Cell N3 is the reference cell. when N3 = one of the values the row, I need the cell in the row of numbers that matches to highlight.

Secondarily, the value in N3 may not be the exact number in row of numbers (E3:M3). Is there a way to have Excel highlight the value in the row CLOSEST to the reference cell?

Example: The reference cell has N3 = $2.20. Cell G3 = 2.12 and G3 = $2.65. N3 is closest to G3 so G3 would highlight. A bit complicated.

For formatting i tried: =ABS($E$3-$M$3)=$N$3

For getting the closest number. I'm in over my head. I thought I could calculate the difference between the reference cell N3 and the absolute value in each cell in the row. I.e., N3-E3, N3-F3, etc. Then my brain hit redline and the chess game was over.

1

There are 1 best solutions below

0
Abdul Rahman Sabra On

Follow the below steps:

  1. Highlight from E3 to M3 Only
  2. Go to New Formatting Rules
  3. Select from the second option (Format only Cells that Contain)
  4. At the Dropdown select cell Value
  5. In the second one select between
  6. The third one Choose N3-(the tolerance you want ex: 0.6 or 3 or 1 etc,,)
  7. Last one do the same as point 6 but this time add the tolerance
  8. Finally choose the format color.