I have the following macro :
If Cells(x, 4) > Cells(x, 5) And Cells(x, 5) > Cells(x, 6) And Cells(x, 6) > Cells(x, 7) And Cells(x, 7) > Cells(x, And Cells(x, > Cells(x, 9) And Cells(x, 9) > Cells(x, 10) And Cells(x, 10) > Cells(x, 11) Then
Range(Cells(x, 4), Cells(x, 256).End(xlToLeft)).Interior.ColorIndex = 33
Because sometimes there are more cells to compare,is there an easier way to write this macro?
Thanks
If Cells(x, 4) > Cells(x, 5) And Cells(x, 5) > Cells(x, 6) And Cells(x, 6) > Cells(x, 7) And Cells(x, 7) > Cells(x, And Cells(x, > Cells(x, 9) And Cells(x, 9) > Cells(x, 10) And Cells(x, 10) > Cells(x, 11) Then
Range(Cells(x, 4), Cells(x, 256).End(xlToLeft)).Interior.ColorIndex = 33
Because sometimes there are more cells to compare,is there an easier way to write this macro?
Thanks