+ Reply to Thread
Results 1 to 6 of 6

Subtotal only group duplicates if value in column

  1. #1
    Registered User
    Join Date
    12-21-2020
    Location
    Atlanta, GA
    MS-Off Ver
    2016
    Posts
    3

    Subtotal only group duplicates if value in column

    Y'all, I'm stumped. I am trying to format daily bank activity and I can't figure out how to do this last part. I have the data sorted the way I want, but now I need to get insert two rows under every change of value in column G where if there are duplicate values and then sum column D (debits) in one of new rows enter image description hereonly if there is a value in it. Then I need to do the same thing for column E (credits). For any unique values in column G, I just need to insert a line. I do this on a daily basis, so the solution needs to be for a macro. The format must match what the results picture looks like. Can someone please point me in the right direction?
    Attached Images Attached Images
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,524

    Re: Subtotal only group duplicates if value in column

    Try the attached.
    Please Login or Register  to view this content.
    Attached Files Attached Files

  3. #3
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,480

    Re: Subtotal only group duplicates if value in column

    When inserting rows, you need to start from the bottom and work up.
    Try this.

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    12-21-2020
    Location
    Atlanta, GA
    MS-Off Ver
    2016
    Posts
    3

    Re: Subtotal only group duplicates if value in column

    Holy cow! This worked! Thank you so much, you are incredible!

  5. #5
    Registered User
    Join Date
    12-21-2020
    Location
    Atlanta, GA
    MS-Off Ver
    2016
    Posts
    3

    Re: Subtotal only group duplicates if value in column

    Thank you Jindon for putting this macro together in the spreadsheet and including a button. That was a nice touch. Unfortunately, when I ran it the unique values were also summed. I do have another project that this will work for though. Thank you again!

  6. #6
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,524

    Re: Subtotal only group duplicates if value in column

    OOps, of course...
    typo
    Please Login or Register  to view this content.
    should be
    Please Login or Register  to view this content.

+ 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. Group by Data and to do Subtotal.
    By ashrafk07 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-06-2017, 01:12 AM
  2. Group+Subtotal HOW?
    By toci in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-23-2015, 02:18 PM
  3. [SOLVED] Formula to Calculate Subtotal - Count of #'s Column While Avoiding Duplicates
    By swoosh1014 in forum Excel Formulas & Functions
    Replies: 17
    Last Post: 10-30-2014, 10:09 AM
  4. remove duplicates in each subtotal group
    By trentq in forum Excel General
    Replies: 1
    Last Post: 04-08-2014, 04:02 AM
  5. Replies: 1
    Last Post: 10-19-2012, 07:55 AM
  6. How to Insert Group in Subtotal
    By koolguys4u in forum Excel General
    Replies: 1
    Last Post: 03-25-2012, 12:10 PM
  7. [SOLVED] Group / Outline / subtotal
    By tikchye_oldLearner57 in forum Excel General
    Replies: 0
    Last Post: 06-22-2006, 06:50 AM

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