View Single Post
 
Old 01-09-2015, 02:04 PM
grexcelman grexcelman is offline Windows 7 32bit Office 2003
Novice
 
Join Date: Dec 2014
Posts: 21
grexcelman is on a distinguished road
Question 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!
Reply With Quote