PDA

View Full Version : Solved: cell checking



mshbhwn98
02-27-2013, 12:43 PM
I have 3 cells, say A1, a2 and a3.
I want to put a button in my excel spreadsheet that executes 5 macros that use the first 2 values. Then if either of them are changed and i push the button again I want to re run all 5 macros. But if just the 3rd number is changed I want to run just 3.

It's essentially checking to see if there are changes in 2 values. If there is a change run everything else just run 3 macros.

Thanks

Bob Phillips
02-28-2013, 03:09 AM
Use static variables in your button code to hold the values of A1, A2 and A3, and just check if the actual value of these cells has changed.

mshbhwn98
02-28-2013, 09:59 AM
thank you