+ Reply to Thread
Results 1 to 20 of 20

Formula to consolidate data from multiple sheets

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    02-24-2015
    Location
    Egypt
    MS-Off Ver
    Office 365 ProPlus
    Posts
    769

    Formula to consolidate data from multiple sheets

    Hello Everybody,
    Could you help me in my question ,please?
    I want to consolidate data from multiple sheets and put them in "Report" Sheet.
    See "Report " sheet for the results.
    Please Use Formulas not VBA.
    Office 365.
    See the attachment
    Attached Files Attached Files

  2. #2
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,213

    Re: Formula to consolidate data from multiple sheets

    Please try at
    A4
    =DATE(2021,1,MATCH(SEQUENCE(COUNTA('1:31'!$A$4:$A$100))-1,MMULT(N(SEQUENCE(31)>SEQUENCE(,31)),SUBTOTAL(3,INDIRECT("'"&SEQUENCE(31)&"'!A4:A100")))))

    B4:L4
    =IFERROR(FILTER(FILTERXML("<x><m>"&TEXTJOIN("</m><m>",0,'1:31'!A$4:A$100)&"</m></x>","//m"),1-ISERR(FILTERXML("<x><m>"&TEXTJOIN("</m><m>",0,'1:31'!$A$4:$A$100)&"</m></x>","//m"))),"")
    Attached Files Attached Files

  3. #3
    Forum Contributor
    Join Date
    02-24-2015
    Location
    Egypt
    MS-Off Ver
    Office 365 ProPlus
    Posts
    769

    Re: Formula to consolidate data from multiple sheets

    Thanks Bo_Ry for your solution.
    But This formula doesnot work with big data more than 150 row in every sheet.
    I`am sorry I didn`t mention that my data can exceeds that limit 150 row.
    Is there any alternative?

  4. #4
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,213

    Re: Formula to consolidate data from multiple sheets

    For more data better use Power Query or VBA

    Power Query
    Change file path in red

    let
        Source = Excel.Workbook(File.Contents("D:\Get Data From Multiple Sheets.xlsx"), null, true),
        Filtered = Table.SelectRows(Source, each [Kind] = "Sheet" and not Text.Contains([Item], "Report")),
        AddedT = Table.AddColumn(Filtered, "T", each Table.PromoteHeaders(Table.RemoveFirstN([Data],2))),
        RemovedColumns = Table.RemoveColumns(AddedT,{"Data", "Item", "Kind", "Hidden"}),
        AddedSuffix = Table.TransformColumns(RemovedColumns, {{"Name", each _ & "Jan2021", type text}}),
        ExpandedT = Table.ExpandTableColumn(AddedSuffix, "T",Table.ColumnNames(AddedSuffix[T]{0})),
        ChangedType = Table.TransformColumnTypes(ExpandedT,{{"Name", type date}, {"Machine", type text}, {"From", type time}, {"To", type time}, {"Total Time", type time}, {"Failure#(lf)Code", Int64.Type}, {"Extention#(lf)Code", type any}, {"Delay#(lf)Code", type any}, {"Equip. Name", type any}, {"Stoppage Code", Int64.Type}, {"Stoppage Description", type text}, {"Stoppage Category", type text}})
    in
        ChangedType


    VBA

    Sub combine()
    Dim s As Worksheet
    Application.ScreenUpdating = False
        For Each s In ThisWorkbook.Sheets
            If Not s.Name Like "Report*" Then
                With s.[A3].CurrentRegion.Offset(1)
                    .Resize(.Rows.Count - 1).Copy Sheets("Report VBA").Cells(Rows.Count, 2).End(xlUp)(2)
                    Sheets("Report VBA").Cells(Rows.Count, 1).End(xlUp)(2).Resize(.Rows.Count - 1) = s.Name & "Jan"
                End With
            End If
        Next
    Application.ScreenUpdating = True
    End Sub
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    02-24-2015
    Location
    Egypt
    MS-Off Ver
    Office 365 ProPlus
    Posts
    769

    Re: Formula to consolidate data from multiple sheets

    Thanks again Bo_Ry.
    But I prefer using formulas.
    Why can`t you use formulas?Will the file be slowser?

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,288

    Re: Formula to consolidate data from multiple sheets

    How many rows maximum per sheet.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  7. #7
    Forum Contributor
    Join Date
    02-24-2015
    Location
    Egypt
    MS-Off Ver
    Office 365 ProPlus
    Posts
    769

    Re: Formula to consolidate data from multiple sheets

    Glen,
    Maybe 5000 rows Maximum

  8. #8
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,288

    Re: Formula to consolidate data from multiple sheets

    Hahaha. Formulae just won't work with that data size. Forget it.

    Go with PQ or VBA.

  9. #9
    Forum Contributor
    Join Date
    02-24-2015
    Location
    Egypt
    MS-Off Ver
    Office 365 ProPlus
    Posts
    769

    Re: Formula to consolidate data from multiple sheets

    What is your formula size limit?

  10. #10
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,828

    Re: Formula to consolidate data from multiple sheets

    Do you mean that your Report sheet might be up to 5000 rows, or that an individual daily sheet might contain that number of rows? If the former, does that mean that your daily sheets are not likely to exceed 200 or so rows?

    Pete

  11. #11
    Forum Contributor
    Join Date
    02-24-2015
    Location
    Egypt
    MS-Off Ver
    Office 365 ProPlus
    Posts
    769

    Re: Formula to consolidate data from multiple sheets

    Quote Originally Posted by Pete_UK View Post
    Do you mean that your Report sheet might be up to 5000 rows, or that an individual daily sheet might contain that number of rows? If the former, does that mean that your daily sheets are not likely to exceed 200 or so rows?

    Pete
    Every sheet can reach 1000 row or more

  12. #12
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,288

    Re: Formula to consolidate data from multiple sheets

    We're NOT going down that way again. You wouldn't believe me about INDIRECT alternatives, but I was right.

    FORGET IT. It won't work.

  13. #13
    Forum Contributor
    Join Date
    02-24-2015
    Location
    Egypt
    MS-Off Ver
    Office 365 ProPlus
    Posts
    769

    Re: Formula to consolidate data from multiple sheets

    Quote Originally Posted by Glenn Kennedy View Post
    We're NOT going down that way again. You wouldn't believe me about INDIRECT alternatives, but I was right.

    FORGET IT. It won't work.
    No,I tried indirect alternatives .They are very slow.
    Indirect works here well but how can it brings all data?

  14. #14
    Forum Contributor
    Join Date
    02-24-2015
    Location
    Egypt
    MS-Off Ver
    Office 365 ProPlus
    Posts
    769

    Re: Formula to consolidate data from multiple sheets

    I could create "indirect" formula to get data from other sheets but it is not dynamic,I should drag it down manually.
    =FILTER(INDIRECT("'"&DAY(A4)&"'!$A$4:$K$1000"),INDIRECT("'"&DAY(A4)&"'!$A$4:$a$1000")<>"")
    How to make it dynamic?
    When I put "#" sign to a4#, it shows me value error.
    Please help me
    see the attachment sheet"Report(2)"
    Attached Files Attached Files

  15. #15
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,213

    Re: Formula to consolidate data from multiple sheets

    Please try at B4

    =INDIRECT("'"&DAY($A4)&"'!R"&COUNTIF($A$4:$A4,$A4)+3&"C[-1]",)

  16. #16
    Forum Contributor
    Join Date
    02-24-2015
    Location
    Egypt
    MS-Off Ver
    Office 365 ProPlus
    Posts
    769

    Re: Formula to consolidate data from multiple sheets

    Thanks Bo_Ry for your solution but this formula is not dynamic,it takes a lot of time calculating.
    If it is dynamic,it will take less time calculating.

  17. #17
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,213

    Re: Formula to consolidate data from multiple sheets

    try at B4

    =LET(i,SEQUENCE(COUNTA('1:31'!$A$4:$A$1000))-1,a,MMULT(N(SEQUENCE(31)>SEQUENCE(,31)),SUBTOTAL(3,INDIRECT("'"&SEQUENCE(31)&"'!A4:A1000"))),d,MATCH(i,a),r,i-LOOKUP(i,a)+4,CELL("contents",INDIRECT("'"&d&"'!R"&r&"C"&SEQUENCE(,11),)))

  18. #18
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,646

    Re: Formula to consolidate data from multiple sheets

    Not sure you are using the term 'dynamic' correctly - what do you mean by it?
    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.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  19. #19
    Forum Contributor
    Join Date
    02-24-2015
    Location
    Egypt
    MS-Off Ver
    Office 365 ProPlus
    Posts
    769

    Re: Formula to consolidate data from multiple sheets

    I mean Dynamic formula like filter-sort-unique.
    see post #14

  20. #20
    Forum Contributor
    Join Date
    02-24-2015
    Location
    Egypt
    MS-Off Ver
    Office 365 ProPlus
    Posts
    769

    Re: Formula to consolidate data from multiple sheets

    Thanks,well done
    solved

+ 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: 2
    Last Post: 06-08-2021, 11:04 AM
  2. How to Find & Consolidate data from Multiple Sheets
    By GemBox in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-21-2016, 10:38 AM
  3. [SOLVED] Macro to consolidate data from multiple sheets to one
    By jw01 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-12-2014, 11:58 AM
  4. [SOLVED] Consolidate data from multiple sheets into one sheet
    By adil.master in forum Excel Charting & Pivots
    Replies: 5
    Last Post: 08-04-2013, 02:41 AM
  5. [SOLVED] Need help with a macro to consolidate data from multiple sheets into one
    By xdskyline in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-15-2013, 06:21 PM
  6. Pull Data from multiple sheets and consolidate.
    By edgarx50 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-02-2013, 07:47 PM
  7. how do i use import to consolidate data from multiple sheets
    By Naveen in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-14-2006, 07:45 AM

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