DogsbodyBoy
New Member
- Joined
- Oct 24, 2022
- Messages
- 20
- Office Version
- 365
- Platform
- Windows
Hi
I'm hopeful that someone can help me with a VBA question.
I have two ranges of numeric cells in my Excel worksheet, A1:A6 and C1:C6
In cell A10 I have this formula that totals any negative values in these two numeric ranges:
=SUMIF(A1:A6,"<0")+SUMIF(C1:C6,"<0")
This means that if all the numbers in the two ranges are either zero or positive then cell A10 equals zero, but as soon as any number in the two ranges becomes negative then cell A10 changes to that negative value.
My objective is to add VBA code to the worksheet so that whenever cell A10 becomes negative then I want to automatically run a macro named MyMacro.
All help is much appreciated.
I'm hopeful that someone can help me with a VBA question.
I have two ranges of numeric cells in my Excel worksheet, A1:A6 and C1:C6
In cell A10 I have this formula that totals any negative values in these two numeric ranges:
=SUMIF(A1:A6,"<0")+SUMIF(C1:C6,"<0")
This means that if all the numbers in the two ranges are either zero or positive then cell A10 equals zero, but as soon as any number in the two ranges becomes negative then cell A10 changes to that negative value.
My objective is to add VBA code to the worksheet so that whenever cell A10 becomes negative then I want to automatically run a macro named MyMacro.
All help is much appreciated.