+ Reply to Thread
Results 1 to 8 of 8

Help with grouping and consolidation

Hybrid View

  1. #1
    Registered User
    Join Date
    12-17-2015
    Location
    Sweden
    MS-Off Ver
    2015
    Posts
    2

    Question Help with grouping and consolidation

    Hi,

    I wasn't sure which sub-forum this should be asked in, hence posting it in the general forum.

    I have data from invoices that are spread over the years. It has Year, Item number, Net sales and Quantity as rows.
    You can see it in sheet1 of the attached excel.

    What I need is consolidation and grouping by year like in sheet2 of the attachment.

    I'm not sure if this requires writing macros, simple forumals, etc... but any help pointing towards the direction will be much appreciated

    Thanks,
    Rahul

    consolidation.xlsx
    Last edited by rahul_venky; 12-18-2015 at 06:46 AM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2507 (Windows 11 Home 24H2 64-bit)
    Posts
    91,790

    Re: Help with grouping and consolidation

    This in Sheet 2 B2 copied across should get you started:

    =SUMIFS(Sheet1!$B3:$S3,Sheet1!$B$1:$S$1,Sheet2!B$1,Sheet1!$B$2:$S$2,"Type1")

    Copy down and change Type 1 as appropriate.

    Late edit: in D2 you will need =SUMIFS(Sheet1!$B3:$S3,Sheet1!$B$1:$S$1,Sheet2!B$1,Sheet1!$B$2:$S$2,"Type2") and in F2 =SUMIFS(Sheet1!$B3:$S3,Sheet1!$B$1:$S$1,Sheet2!B$1,Sheet1!$B$2:$S$2,"Type3") and so on.
    Last edited by AliGW; 12-18-2015 at 07:02 AM.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Microsoft® Excel® for Microsoft 365 MSO (Version 2503 Build 16.0.18604.20000) 64-bit
    Posts
    4,000

    Re: Help with grouping and consolidation

    @AliGW I don't think it would work.

    @rahul as per your requirement

    try B2=SUMPRODUCT((IF(LEFT($A2,1)="N",REPLACE(LEFT($A2,FIND(" ",$A2)-1),4,0," "),LEFT($A2,FIND(" ",$A2)-1))=Sheet1!$A$3:$A$4)*(SUBSTITUTE(TRIM(RIGHT($A2,LEN($A2)-FIND(" ",$A2)))," ","")=Sheet1!$B$2:$S$2)*(Sheet2!B$1=Sheet1!$B$1:$S$1)*(Sheet1!$B$3:$S$4))

    Drag over and down.

    Formula: copy to clipboard
    =SUMPRODUCT((IF(LEFT($A2,1)="N",REPLACE(LEFT($A2,FIND(" ",$A2)-1),4,0," "),LEFT($A2,FIND(" ",$A2)-1))=Sheet1!$A$3:$A$4)*(SUBSTITUTE(TRIM(RIGHT($A2,LEN($A2)-FIND(" ",$A2)))," ","")=Sheet1!$B$2:$S$2)*(Sheet2!B$1=Sheet1!$B$1:$S$1)*(Sheet1!$B$3:$S$4))
    If I helped, Don't forget to add reputation (click on the little star ★ at bottom of this post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2507 (Windows 11 Home 24H2 64-bit)
    Posts
    91,790

    Re: Help with grouping and consolidation

    Quote Originally Posted by shukla.ankur281190 View Post
    @AliGW I don't think it would work.
    I can assure you that it does work in the file provided by the OP, and he has also said that it works "like a charm".

  5. #5
    Registered User
    Join Date
    12-17-2015
    Location
    Sweden
    MS-Off Ver
    2015
    Posts
    2

    Re: Help with grouping and consolidation

    Hi AliGW,

    Thanks a lot! that worked like a charm

    The only think it asked me to change was the "," to ";" in the formula.

    Thanks again,
    Rahul

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2507 (Windows 11 Home 24H2 64-bit)
    Posts
    91,790

    Re: Help with grouping and consolidation

    You're very welcome! Your locale requires the ";", mine the ",". Glad it worked for you.

  7. #7
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Microsoft® Excel® for Microsoft 365 MSO (Version 2503 Build 16.0.18604.20000) 64-bit
    Posts
    4,000

    Re: Help with grouping and consolidation

    Yes It would work only for fist two rows but the next will give you 0 as sumrange you have taken Sheet1!$B3:$S3 and you have locked the columns not the row, however If Rahul is with this solution then its O.K.

    Thanks
    Ankur

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2507 (Windows 11 Home 24H2 64-bit)
    Posts
    91,790

    Re: Help with grouping and consolidation

    Quote Originally Posted by shukla.ankur281190 View Post
    Yes It would work only for fist two rows but the next will give you 0 as sumrange you have taken Sheet1!$B3:$S3 and you have locked the columns not the row, however If Rahul is with this solution then its O.K.

    Thanks
    Ankur
    Your point is correct, yes, and I omitted to mention it in my post, but I believe that Rahul worked it out. I will edit my post.

+ 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. Replies: 0
    Last Post: 12-10-2015, 08:24 AM
  2. [SOLVED] Consolidation several tabs' data into a consolidation sheet via a loop?
    By Gti182 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 07-30-2015, 08:18 AM
  3. Replies: 4
    Last Post: 07-26-2014, 02:35 AM
  4. Merge, Consolidation, and Grouping Question
    By petevang in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-24-2013, 05:31 PM
  5. Grouping, Consolidation, or Merging Help Needed
    By petevang in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-24-2013, 02:06 AM
  6. Want to get a Series with Grouping and Sub-Grouping based on 2 criterias.
    By e4excel in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-02-2011, 05:46 AM
  7. Grouping results using MultiSheet Consolidation
    By scottb in forum Excel General
    Replies: 4
    Last Post: 08-26-2010, 07:48 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