value within 3 of other cells on the row

  • I have a table and on each row, I want to conditionally highlight any two or more cells in the Daily Yardage columns with the same colour if the values are within 3 of any other cell in any other Daily Yardage column within the same row.In other words, I want to compare the values in G6, M6, S6, Y6 and AE6 and if any values are within 3 of another, change the colour on the two or more cells that are within 3.



    another generous user elsewhere has suggested the following


    =COUNTIFS($G$4:$AE$4,"Daily Yardage",$G6:$AE6,">="&(G6-3),$G6:$AE6,"<="&(G6+3))>1 as a conditional format rule applied to $G$6:$AE$36


    When creating the conditional rule, I select the range by left clicking on G6 and dragging down to G31, then holding the CTRL key, I do the same for the columns M, S, Y and AE which gives me the range =$G$6:$G$36,$M$6:$M$36,$S$6:$S$36,$Y$6:$Y$36,$AE$6:$AE$36




    Unfortunately, it doesn't return the results as desired as you can see here.




    Here are the rule windows so you can see that the entries are correct.







    If anyone can help, I would be most appreciative.

  • Hello,


    To make everybody's life much easier ... why not attaching a sample file

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Smiley" icon, below, in the bottom right corner :)

  • Sorry, I didn't realize I could do that. I will next time.


    On a brighter note, with some help, I have been able to get the results I was after.


    Thank you for the reply

  • Glad you could fix your problem :)

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Smiley" icon, below, in the bottom right corner :)

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!