Hi Everyone,
I'm trying to write a macro in VBA which sums up a list of numbers up to but not over a limit (10,000.00) starting from the top and then return the sum at the bottom of the column. I'd also like it to return the sum of the related numbers in the next column as well. I think this is best expressed in my example below. Column A is the column which I'm referring to for the 10,000 limit.
Macro example.PNG
The 10,000 limit is breached in column A at row 13 where the total is 10,431.15 so I need to return the sum of the entries before this point (i.e. sum of the numbers in A1 to A12 in this example) which would be 9424.54. At the bottom of column B the corresponding entries pre the 10,000 breach in column A are 282.83 (i.e. sum of the numbers in B1 to B12).
I'm fairly new to VBA so any help or guidance would be greatly appreciated.
Bookmarks