Perform calc in active cell then highlight based on formula result
Looking to perform a calc after clicking a button, ABS(active cell - total cell) and if this result is greater than an average cell, highlight the active cell, else move on to the next cell in the range(a1:q10).
for example: in cell A1, take the absolute value of the difference between the active cell(a1) and the total cell(R1), and compare this result to the average value(S1). if the active cell(a1) is greater than average cell(s1), then highlight the active cell(a1). Perform this function for each cell within the range of A1:S14.
Guessing I need to use a 'for next loop' and within each increment, the active cell will run the above calc. After I run this macro, I could also click another button which removes all formatting. I plan to use this code on several sheets throughout my workbook. Can anyone help on this code? Thanks in advance!
|