+ Reply to Thread
Results 1 to 30 of 30

Extract from Tables from multiple tabs: One Workbook

  1. #1
    Registered User
    Join Date
    08-18-2017
    Location
    Charlotte, NC, USA
    MS-Off Ver
    Microsoft 2016
    Posts
    74

    Extract from Tables from multiple tabs: One Workbook

    Hello everyone, I am hoping someone is willing to help me out with something I am having a difficult time with.

    Attached you will find a workbook with multiple tabs. I am trying to pull data from all the tabs and paste them into tab "Input Table" with the format given.

    Please note that the tables are much larger and there are numerous tabs than the example given. So if we can write up a formula that captures the columns/rows.

    In the "Input Table", I can place the middle account number in the first column along with the representing date, if we can find a formula that will fill in the rest, that will be helpful.

    If it makes it easier, you can insert a row of corresponding dates for each tab. Considering the format is always the same.

    Thank you in advance for your time and help in this.


    EDIT - PLEASE SEE LATEST ATTACHMENT -
    Last edited by d7882; 02-15-2021 at 10:51 AM.

  2. #2
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: Extract from Tables from multiple tabs: One Workbook

    Hi,
    Do you have always 3 tabs for each year? Or is it inconsistent?

  3. #3
    Registered User
    Join Date
    08-18-2017
    Location
    Charlotte, NC, USA
    MS-Off Ver
    Microsoft 2016
    Posts
    74

    Re: Extract from Tables from multiple tabs: One Workbook

    Hi Belinda, unfortunately the tabs are inconsistent.

  4. #4
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: Extract from Tables from multiple tabs: One Workbook

    Hi,
    Please see a suggestion.
    In column H I added the tab name (I changed the names to include a number instead of roman symbols, so it can be put into calculation in case each year contains 3 tabs and 72 variables):

    H2 ABC 2019 1
    H3 and down
    Please Login or Register  to view this content.
    C2 =
    Please Login or Register  to view this content.
    For D2, E2, f2 change only the line numbers marked red below, and as you can see in the attached file.
    Attached Files Attached Files

  5. #5
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: Extract from Tables from multiple tabs: One Workbook

    Quote Originally Posted by d7882 View Post
    Hi Belinda, unfortunately the tabs are inconsistent.
    I see, so according to my suggestion - you will have to input the tab names manually

  6. #6
    Registered User
    Join Date
    08-18-2017
    Location
    Charlotte, NC, USA
    MS-Off Ver
    Microsoft 2016
    Posts
    74

    Re: Extract from Tables from multiple tabs: One Workbook

    Quote Originally Posted by belinda200 View Post
    I see, so according to my suggestion - you will have to input the tab names manually
    Hi Belinda - I have taken a look and it looks to be working except for one issue. What if there are more columns in the "Input Table".

    I had put First Row, Second Row, Third Row, and Middle Row as examples. There are in fact 19 total rows, which would be 19 total columns.

    I think I figured it out - you already mentioned it above regarding changing the red numbers in the cell.

    Edit - Belinda, the way I tried it with your formula only worked partly but was not able to complete the entire data that I have in my original file. I think what I will do is simplify the format further so it's easier to work with. If I can attach another file to this thread, I will.

    Thank you for trying to help me.
    Last edited by d7882; 02-08-2021 at 10:19 PM.

  7. #7
    Registered User
    Join Date
    08-18-2017
    Location
    Charlotte, NC, USA
    MS-Off Ver
    Microsoft 2016
    Posts
    74

    Re: Extract from Tables from multiple tabs: One Workbook

    Ok, I have simplified the data table to pull. Please see attachment.

    Two tabs, one is Fill In where the data needs to be pasted and the Data_Table tab where the data is held.

    Please note that the Data_Table is small and let's assume that the "Store" continues down hundreds of rows, so if we can find a formula that captures down the entire column would be great.

    In the Fill In tab, I've colored the cells that need to be pasted in yellow. I hope this is easier than the previous attachment hah.

    Thank you very much for your help.
    Last edited by d7882; 02-15-2021 at 10:52 AM.

  8. #8
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: Extract from Tables from multiple tabs: One Workbook

    OK, it was not a bit easier (for me at least) , but the helper row & column that add the numbering is an anchor...
    so I think I managed to find something.

    How about that in C2 and across?

    Please Login or Register  to view this content.
    Let me know if that works for you.
    Attached Files Attached Files
    Last edited by Limor_OP; 02-09-2021 at 02:45 PM.

  9. #9
    Registered User
    Join Date
    08-18-2017
    Location
    Charlotte, NC, USA
    MS-Off Ver
    Microsoft 2016
    Posts
    74

    Re: Extract from Tables from multiple tabs: One Workbook

    Hi Belinda, thank you for helping me with this. Is there a way to have the columns go fully down instead of have them fixed to a certain row number? ie. $B$2:$B2, because the original data continues to go further down. I tried to change it to $B:$B but that didn't seem to work for me.

    So imagine in the "Data_Table", the data goes beyond the CCC, assume there is a DDD, EEE, etc. Is this possible? I was hoping this could have been done with an index match match function but it turns out to be complicated - sorry but thank you for your help.

  10. #10
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: Extract from Tables from multiple tabs: One Workbook

    OK, so you will have to fill in the dates in column B further down, and the formula will work

    Yes, this case certainly cannot be solved with simple index match

  11. #11
    Registered User
    Join Date
    08-18-2017
    Location
    Charlotte, NC, USA
    MS-Off Ver
    Microsoft 2016
    Posts
    74

    Re: Extract from Tables from multiple tabs: One Workbook

    Can you walk me through how I can do this. I filled in the dates and when I copy and paste the last row, it gives me #NUM! errors. I've attached what I'm referring to. ahhh lol
    Last edited by d7882; 02-15-2021 at 10:52 AM.

  12. #12
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: Extract from Tables from multiple tabs: One Workbook

    Hi
    You need to change the range that end in row row 26, I changed to 1000

    Put this in C2 and across:

    Please Login or Register  to view this content.

  13. #13
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: Extract from Tables from multiple tabs: One Workbook

    Let me know if that works for you....

  14. #14
    Registered User
    Join Date
    08-18-2017
    Location
    Charlotte, NC, USA
    MS-Off Ver
    Microsoft 2016
    Posts
    74

    Re: Extract from Tables from multiple tabs: One Workbook

    Quote Originally Posted by belinda200 View Post
    Let me know if that works for you....
    It works until I have to use the next tab. I tried to change the names in the formula, but for some reason, it captures the data at an incorrect row but the right tab. I think what I will do is just create separate tabs for each new row and populate the formula. It seems to be working that way. Then, I'll consolidate those tabs.

    Unless you know of a simple fix for this?

  15. #15
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: Extract from Tables from multiple tabs: One Workbook

    Given that the new tab has the same structure but only different name - you need to change the areas in red below
    you can try and upload a sample file

    =INDEX(INDIRECT("'"&"Data_Table"&"'!G"&AGGREGATE(15,6,ROW(Data_Table!$E$6:$E$1000)/(--(Data_Table!$E$6:$E$1000='Fill In'!C$1)),SUM(--(MONTH('Fill In'!$B$2:$B2)=1)))&":R"&AGGREGATE(15,6,ROW(Data_Table!$E$6:$E$1000)/(--(Data_Table!$E$6:$E$1000='Fill In'!C$1)),SUM(--(MONTH('Fill In'!$B$2:$B2)=1)))),AGGREGATE(15,6,COLUMN(Data_Table!$G$6:$R$6)-COLUMN(Data_Table!$F:$F),ROUND(MOD(ROW()-2+0.5,12),0)))

  16. #16
    Registered User
    Join Date
    08-18-2017
    Location
    Charlotte, NC, USA
    MS-Off Ver
    Microsoft 2016
    Posts
    74

    Re: Extract from Tables from multiple tabs: One Workbook

    what about these in blue;
    =INDEX(INDIRECT("'"&"Data_Table"&"'!G"&AGGREGATE(15,6,ROW(Data_Table!$E$6:$E$1000)/(--(Data_Table!$E$6:$E$1000='Fill In'!C$1)),SUM(--(MONTH('Fill In'!$B$2:$B2)=1)))&":R"&AGGREGATE(15,6,ROW(Data_Table!$E$6:$E$1000)/(--(Data_Table!$E$6:$E$1000='Fill In'!C$1)),SUM(--(MONTH('Fill In'!$B$2:$B2)=1)))),AGGREGATE(15,6,COLUMN(Data_Table!$G$6:$R$6)-COLUMN(Data_Table!$F:$F),ROUND(MOD(ROW()-2+0.5,12),0)))

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

    Re: Extract from Tables from multiple tabs: One Workbook

    Please try at
    A2
    =--MID(INDEX(CHOOSE(INT((ROWS(A$2:A2)-1)/24)+1,'ABC I 2019'!$A:$A,'ABC II 2019'!$A:$A,'ABC III 2019'!A:A,'ABC I 2020'!$A:$A),MOD(INT(INT(ROWS(A$2:A2)-1)/12),2)*5+3+COLUMNS($A2:A2)),4,3)

    B2
    =--MID(INDEX(CHOOSE(INT((ROWS(B$2:B2)-1)/24)+1,'ABC I 2019'!$D$3:$O$3,'ABC II 2019'!$D$3:$O$3,'ABC III 2019'!$D$3:$O$3,'ABC I 2020'!$D$3:$O$3),MOD(ROWS(B$2:B2)-1,12)+1),8,20)

    C2:F2
    =--MID(INDEX(CHOOSE(INT((ROWS(B$2:B2)-1)/24)+1,'ABC I 2019'!$D$3:$O$3,'ABC II 2019'!$D$3:$O$3,'ABC III 2019'!$D$3:$O$3,'ABC I 2020'!$D$3:$O$3),MOD(ROWS(B$2:B2)-1,12)+1),8,20)


    For more shees better use Power Query
    Change file path in red


    Please Login or Register  to view this content.
    Attached Files Attached Files

  18. #18
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: Extract from Tables from multiple tabs: One Workbook

    Quote Originally Posted by d7882 View Post
    what about these in blue;
    =INDEX(INDIRECT("'"&"Data_Table"&"'!G"&AGGREGATE(15,6,ROW(Data_Table!$E$6:$E$1000)/(--(Data_Table!$E$6:$E$1000='Fill In'!C$1)),SUM(--(MONTH('Fill In'!$B$2:$B2)=1)))&":R"&AGGREGATE(15,6,ROW(Data_Table!$E$6:$E$1000)/(--(Data_Table!$E$6:$E$1000='Fill In'!C$1)),SUM(--(MONTH('Fill In'!$B$2:$B2)=1)))),AGGREGATE(15,6,COLUMN(Data_Table!$G$6:$R$6)-COLUMN(Data_Table!$F:$F),ROUND(MOD(ROW()-2+0.5,12),0)))
    everything! that contains the irrelevant sheet name.

  19. #19
    Registered User
    Join Date
    08-18-2017
    Location
    Charlotte, NC, USA
    MS-Off Ver
    Microsoft 2016
    Posts
    74

    Re: Extract from Tables from multiple tabs: One Workbook

    Oh boy I really can't get them to work

    I have changed the tables for the last time in hopes that we can simplify it a bit more for me, very sorry.

    There are 3 tabs of data, 2019, 2020, and 2021. Please assume that the tables go down hundreds of rows, so from Store AAA to Store ZZZ etc.

    We then capture the data from those tables and almost transpose them in the appropriate CAT# based on the proper Date.

    I feel like we just need to match the Store, CAT#, and Date but Date and CAT# are transposed.

    If you guys think it would be easier if the data tables were formatted in a different way, please let me know.

    Can't thank you more than enough for your time. Truly appreciate it!
    Last edited by d7882; 02-15-2021 at 10:52 AM.

  20. #20
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: Extract from Tables from multiple tabs: One Workbook

    I see Bo_Ry gave you the ultimate solution.....you can go with that.
    Last edited by Limor_OP; 02-10-2021 at 03:54 PM.

  21. #21
    Registered User
    Join Date
    08-18-2017
    Location
    Charlotte, NC, USA
    MS-Off Ver
    Microsoft 2016
    Posts
    74

    Re: Extract from Tables from multiple tabs: One Workbook

    Quote Originally Posted by Bo_Ry View Post
    Please try at
    A2
    =--MID(INDEX(CHOOSE(INT((ROWS(A$2:A2)-1)/24)+1,'ABC I 2019'!$A:$A,'ABC II 2019'!$A:$A,'ABC III 2019'!A:A,'ABC I 2020'!$A:$A),MOD(INT(INT(ROWS(A$2:A2)-1)/12),2)*5+3+COLUMNS($A2:A2)),4,3)

    B2
    =--MID(INDEX(CHOOSE(INT((ROWS(B$2:B2)-1)/24)+1,'ABC I 2019'!$D$3:$O$3,'ABC II 2019'!$D$3:$O$3,'ABC III 2019'!$D$3:$O$3,'ABC I 2020'!$D$3:$O$3),MOD(ROWS(B$2:B2)-1,12)+1),8,20)

    C2:F2
    =--MID(INDEX(CHOOSE(INT((ROWS(B$2:B2)-1)/24)+1,'ABC I 2019'!$D$3:$O$3,'ABC II 2019'!$D$3:$O$3,'ABC III 2019'!$D$3:$O$3,'ABC I 2020'!$D$3:$O$3),MOD(ROWS(B$2:B2)-1,12)+1),8,20)


    For more shees better use Power Query
    Change file path in red


    Please Login or Register  to view this content.
    Hello Bo, please see my attachment as it is not working like yours (I dont have power query) so the old fashion functions will have to do
    Last edited by d7882; 02-15-2021 at 10:53 AM.

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

    Re: Extract from Tables from multiple tabs: One Workbook

    Please try at

    A2
    =INDEX(CHOOSE(INT((ROWS(A$2:A2)-1)/24)+1,'2019'!A:A,'2020'!A:A,'2021'!A:A),MOD(INT((ROWS(A$2:A2)-1)/12),2)*(COUNTA('2019'!A:A)-1)/2+4)

    B2
    =INDEX(CHOOSE(INT((ROWS(B$2:B2)-1)/24)+1,'2019'!$D$3:$O$3,'2020'!$D$3:$O$3,'2021'!$D$3:$O$3),MOD(ROWS(B$2:B2)-1,12)+1)

    C2:U2
    =INDEX(CHOOSE(INT((ROWS(C$2:C2)-1)/24)+1,'2019'!$D:$O,'2020'!$D:$O,'2021'!$D:$O),MOD(INT((ROWS(C$2:C2)-1)/12),2)*(COUNTA('2019'!$A:$A)-1)/2+3+COLUMNS($C2:C2),MOD(ROWS(C$2:C2)-1,12)+1)



    Power Query is at Ribbon DATA
    https://support.microsoft.com/en-us/...6-59e18d75b4de

    Please Login or Register  to view this content.
    Attached Files Attached Files

  23. #23
    Registered User
    Join Date
    08-18-2017
    Location
    Charlotte, NC, USA
    MS-Off Ver
    Microsoft 2016
    Posts
    74

    Re: Extract from Tables from multiple tabs: One Workbook

    ugh - I don't get why it's not working for me.

    My final attempt with attachment. Thank you for the help, this forum is great and the people are fantastic.
    Attached Files Attached Files

  24. #24
    Registered User
    Join Date
    08-18-2017
    Location
    Charlotte, NC, USA
    MS-Off Ver
    Microsoft 2016
    Posts
    74

    Re: Extract from Tables from multiple tabs: One Workbook

    bumping this for a final touch up on my latest attachment.

    Any help would be greatly appreciated.

  25. #25
    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. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,647

    Re: Extract from Tables from multiple tabs: One Workbook

    Hello Bo, please see my attachment as it is not working like yours (I dont have power query) so the old fashion functions will have to do
    Your forum profile says Excel 2016 - PowerQuery is part of that, so please confirm that it is indeed Excel 2016 that you are using.
    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.

  26. #26
    Registered User
    Join Date
    08-18-2017
    Location
    Charlotte, NC, USA
    MS-Off Ver
    Microsoft 2016
    Posts
    74

    Re: Extract from Tables from multiple tabs: One Workbook

    Quote Originally Posted by d7882 View Post
    bumping this for a final touch up on my latest attachment.

    Any help would be greatly appreciated.
    I prefer to not use PowerQuery as I'm having a hard time without it and probably will have a harder time with it.

    My latest excel file is the most recent. Can anyone help me with this so I can consider this thread solved? I really appreciate everyone's help - one final push?

  27. #27
    Registered User
    Join Date
    08-18-2017
    Location
    Charlotte, NC, USA
    MS-Off Ver
    Microsoft 2016
    Posts
    74

    Re: Extract from Tables from multiple tabs: One Workbook

    24 hour bump

  28. #28
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: Extract from Tables from multiple tabs: One Workbook

    HI ,
    This is the 4th time that you are changing versions,
    So I applied the resolution which I already provided in post #4 to your latest file, BUT I have to say this would be my last time I'm doing that for this thread, I wont do it every time all over again with your various versions....

    Another warning - the file might become very slow as you drag the formulas down since there are many calculations for excel to be done simultaneously.

    So I added another column for tab name, column "D"

    A2 and down:
    Please Login or Register  to view this content.
    B2 and down:
    Please Login or Register  to view this content.
    C3 and down:
    Please Login or Register  to view this content.
    D2 and across:
    Please Login or Register  to view this content.

    Hope this will finally help close this thread
    Attached Files Attached Files

  29. #29
    Registered User
    Join Date
    08-18-2017
    Location
    Charlotte, NC, USA
    MS-Off Ver
    Microsoft 2016
    Posts
    74

    Re: Extract from Tables from multiple tabs: One Workbook

    Thank you Belinda for your help and patience. I will consider this thread solved. Big thanks to everyone who helped in this thread.

  30. #30
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: Extract from Tables from multiple tabs: One Workbook

    Hi,
    I made an amendment to column A and C, there was a miscalculation...
    Please see attached.
    Attached Files Attached Files
    Last edited by Limor_OP; 02-23-2021 at 04:37 PM.

+ 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: 3
    Last Post: 03-14-2019, 01:16 PM
  2. [SOLVED] Extract & Categorize from Master Tables Into Multiple Tables
    By mycon73 in forum Excel General
    Replies: 8
    Last Post: 05-14-2018, 01:13 PM
  3. [SOLVED] VBA code to merge multiple sheet with multiple tabs into one workbook in different tabs
    By Jagdev in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 02-06-2015, 07:42 AM
  4. [SOLVED] Extract Data from multiple tabs in one workbook to a summary tab
    By iceplant in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 10-24-2014, 12:36 PM
  5. Extract Data from multiple tabs in one workbook to a summary tab
    By iceplant in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-23-2014, 02:30 AM
  6. [SOLVED] Extract data from a workbook with multiple tabs, into a workbook with corresponding tabs
    By krackaberr in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-28-2013, 11:54 AM
  7. need to extract two coulms from a workbook with 31 tabs
    By abb16ott in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-31-2008, 01:01 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