I have data in an excel spreadsheet that I need to run a cumulative total on a column, until I reach an amount. Then insert a couple of blank lines with the sum of the calculated rows. Then proceed to do the same for the remaining rows on the sheet.
The sheet is data for motors, and I want to seperate the data so that the cumulative total of column "P" (Full load amps for each motor)for discussions sake is no more than 20 amps. Once I reach 20 amps for a series of rows, I need to insert a couple of blank lines and put the total of "20 amps" in one of the blank lines. Then do the same thing repeating until I reach the end of the worksheet.
Can anyone give me some example code to run in VBA to accomplish this? All help is appreciated.
The sheet is data for motors, and I want to seperate the data so that the cumulative total of column "P" (Full load amps for each motor)for discussions sake is no more than 20 amps. Once I reach 20 amps for a series of rows, I need to insert a couple of blank lines and put the total of "20 amps" in one of the blank lines. Then do the same thing repeating until I reach the end of the worksheet.
Can anyone give me some example code to run in VBA to accomplish this? All help is appreciated.