#1
|
|||
|
|||
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! |
#2
|
|||
|
|||
Hi,
Could you attach a redacted copy of your file? Thanks! |
#3
|
|||
|
|||
Hi Charles. I've attached a redacted file here. To clarify a bit, hoping to run a conditional formatting function as an on off button that I can apply to several sheets in my workbook, all of which are modeled the same as this file attached. For each cell(C4:N15), I will ask the function to look at its respective variance(comparing its value to column Q) and if that absolute variance is greater than the average absolute deviation(column R), then it should be highlighted for review. make sense?
thanks for having a look. greg |
#4
|
|||
|
|||
greg,
Thanks for the attachment. I'll take a look to see if I can help. It will not be today. I have other commitments. And, too another member may pick up on this. |
#5
|
|||
|
|||
Hi,
After taking a quick look at you file. I did not see what you are referring too. Can you provide a example of what needs to be "Hi lighted". |
Tags |
active cell, calculation, loop |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Show result of formula as a value in another cell | Steve_D | Excel | 4 | 10-12-2014 07:38 PM |
Excel 2007, highlight entire row based on data found in one cell | MSofficeBLUE | Excel | 2 | 10-15-2013 09:51 PM |
Change formula cell range based on cell value | Scoth | Excel | 4 | 10-25-2012 07:51 AM |
Can I create a formula that will show result in the same cell and let me copy it down | CranstC | Excel | 1 | 02-11-2012 01:29 AM |
How to highlight the row based on cell value? | Learner7 | Excel | 1 | 12-11-2011 02:28 AM |