VBA Macro to delete subtotal groups equal to zero (0)

marchi315

New Member
Joined
Jun 28, 2018
Messages
1
Hey All! Newbie to VBA, first time poster!

Looking for help on how to write a VBA script that will delete subtotal groups equal to zero. We are implementing a new system and starting a new process for a goods received but not invoiced account and this will be a a way of reconciling the account. I have already written code to format the data, sort by PO number, then subtotal by PO number. The next step should delete the PO subtotals equal to zero, that way we can track and review all outstanding items in the account.

A little about the file:
- Purchase order numbers in column H
- Amounts (subtotal function and system generated values) column I
- The amount of rows that can make a subtotal group has to be flexible, as there can be multiple receipts and invoices per purchase order
- Each month we will roll over the prior month's file that way we can track changes
- Would also be nice to have in the subtotal row a formula that pulls the min value of the date of the transactions in the subtotal group (oldest transactions per each PO). This would help easily identify the oldest transactions that way they can be reviewed periodically.

Looking forward to your replies and help!!
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.

Forum statistics

Threads
1,223,886
Messages
6,175,193
Members
452,616
Latest member
intern444

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