+ Reply to Thread
Results 1 to 3 of 3

Macro delete subtotal row ONLY

  1. #1
    Registered User
    Join Date
    07-29-2013
    Location
    Minnesota, USA
    MS-Off Ver
    Excel 2007
    Posts
    2

    Macro delete subtotal row ONLY

    I need to identify any subtotals that are not zero - would like my macro to subtotal everything, then delete any rows where "total = 0" but not any of the rows that add up to the subtotal...is this possible?

    Example:

    Profit center Amount

    0155 $10
    0155 $2
    0122 $5
    0122 -$5

    After Macro (identifies subtotal for 0155 is not zero...deletes other subtotal zero rows):

    Profit center Amount

    0155 $10
    0155 $2
    Subtotal 0155 $12
    0122 $5
    0122 -$5

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Macro delete subtotal row ONLY

    attach please a sample file with data and desired result.
    explain better how to identfy subtotals
    If solved remember to mark Thread as solved

  3. #3
    Registered User
    Join Date
    07-29-2013
    Location
    Minnesota, USA
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Macro delete subtotal row ONLY

    example for forum.xlsI attached an example - I put the steps on each tab
    Ideally I'm looking for a macro to:
    1)Raw Data
    2)Sort data, add in subtotals
    3)Delete rows where subtotals = zero...highlight subtotals that do not equal zero, delete grand total row
    4)Message stating ___ profit center does not equal zero

    This is a template for a journal entry so we don't want to delete the rows that make up the zero subtotal - we need to have all profit centers sum to zero so we want to be able to idenify those profit centers that don't with a message

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. A Macro to delete a column if the subtotal = 0
    By stimpsond1 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 11-28-2012, 09:36 AM
  2. Replies: 8
    Last Post: 07-31-2012, 09:41 AM
  3. Subtotal - Delete zero Subtotal and prior rows that calculate to that zero Subtotal
    By Whatsherface in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-14-2012, 08:37 PM
  4. Replies: 0
    Last Post: 06-21-2005, 01:05 PM
  5. Re: Macro to delete sheets and saves remaining file does not properly delete module
    By pherrero in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-21-2005, 01:05 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1