Cut Data if sum of columns = zero

Blunder1

Active Member
Joined
Jun 2, 2010
Messages
250
Hi,
On my worksheet there is a line inserted everytime a name changes. Then it runs down the list and in each blank row it sums the cells above (from 1 cells up to the blank row before that noe contain the formula). I use this code below:-

Code:
  For Each rngArea In Columns(11).SpecialCells(xlCellTypeConstants, xlNumbers).Areas
    With rngArea.Offset(rngArea.Rows.Count).Resize(1, 1)
        FormulaR1C1 = "=SUM(" & rngArea.Address(1, 1, xlR1C1) & ")"

I need to add to this code so that when the above has run it then looks looks at the sum value and if this is zero it cuts that line and all the rows within that formula onto another worksheet.

Thanks in Advance

Blunder
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple

Forum statistics

Threads
1,224,527
Messages
6,179,357
Members
452,907
Latest member
Roland Deschain

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top