+ Reply to Thread
Results 1 to 19 of 19

Finding data across multiple sheets

  1. #1
    Forum Contributor
    Join Date
    10-08-2018
    Location
    Atlanta, Georgia
    MS-Off Ver
    Office 365
    Posts
    104

    Finding data across multiple sheets

    Hi,

    Please see the attached file.

    I am trying to populate cells "Calc!D4:F4" with text data entered randomly in cell D4 in the subsequent worksheets. My "if" formula for cell "Calc!D4" is pretty long currently (using indirect- index- Match function) for looking at each cell inthe subsequent sheets sequentially. The formula gets longer for the subsequent two cells. (E4 and F4). I am looking for a simpler solution, as I am pretty sure there would be one! I can't use VBA since the end users will be accessing this file via excel on line.

    Thanks in advance,

    Bharath Srivatsa
    Attached Files Attached Files

  2. #2
    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,916

    Re: Finding data across multiple sheets

    Sorry - I can't find the current formula. Where should I look?
    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.

  3. #3
    Forum Contributor
    Join Date
    10-08-2018
    Location
    Atlanta, Georgia
    MS-Off Ver
    Office 365
    Posts
    104

    Re: Finding data across multiple sheets

    I didn't rewrite the formula for this help file. I didn't post the original file as it is too cumbersome and has sensitive data. However, here are the formulae from the original file for the three cells (These formulae work for me)-

    1st cell-
    IFERROR(IF(INDEX(CZ_Jan!R:R,MATCH(Jan!AA5,CZ_Jan!Q:Q,0))<>"",INDEX(CZ_Jan!R:R,MATCH(Jan!AA5,CZ_Jan!Q:Q,0)),IF(INDEX(CS_Jan!R:R,MATCH(Jan!AA5,CS_Jan!Q:Q,0))<>"",INDEX(CS_Jan!R:R,MATCH(Jan!AA5,CS_Jan!Q:Q,0)),IF(INDEX(ML_Jan!R:R,MAT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,0)),"")))),"")

    Thanks

    Bharath

  4. #4
    Forum Expert
    Join Date
    09-30-2019
    Location
    Chiangmai, Thailand
    MS-Off Ver
    Office 2016, Excel 2019
    Posts
    1,234

    Re: Finding data across multiple sheets

    If you allow to use helper cells.

    C1 (copy down)
    =INDIRECT(B1&"!D4")

    D4
    =INDEX($C$1:$C$6,AGGREGATE(15,6,ROW($C$1:$C$6)*1/(C1:C6<>0),1))

    E4
    =INDEX($C$1:$C$6,AGGREGATE(15,6,ROW($C$1:$C$6)*1/(C1:C6<>0),2))

    F4
    =INDEX($C$1:$C$6,AGGREGATE(15,6,ROW($C$1:$C$6)*1/(C1:C6<>0),3))

    Regards.

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

    Re: Finding data across multiple sheets

    Please try dynamic array spill at D4

    =TRANSPOSE(FILTERXML("<b><a>"&TEXTJOIN("</a><a>",,CS_Jan:JE_Jan!D4:H15)&"</a></b>","//a"))
    Attached Files Attached Files

  6. #6
    Forum Contributor
    Join Date
    10-08-2018
    Location
    Atlanta, Georgia
    MS-Off Ver
    Office 365
    Posts
    104

    Re: Finding data across multiple sheets

    Thank you both- @menem and @Bo_ry.

    Both solutions that were provided work, however it appears I made an error by not clarifying my request adequately. I apologize for the same.
    Please see my updated help request file. I need the column entries in the subsequent tabs to populate the rows in the Calc! tab.

    Thank you again for your invaluable help

    Bharath
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    10-08-2018
    Location
    Atlanta, Georgia
    MS-Off Ver
    Office 365
    Posts
    104

    Re: Finding data across multiple sheets

    Any help? Please see my revised upload.
    Thanks.

  8. #8
    Forum Expert
    Join Date
    09-30-2019
    Location
    Chiangmai, Thailand
    MS-Off Ver
    Office 2016, Excel 2019
    Posts
    1,234

    Re: Finding data across multiple sheets

    How many sheets that you plan to use ?

    Regards.

  9. #9
    Forum Contributor
    Join Date
    10-08-2018
    Location
    Atlanta, Georgia
    MS-Off Ver
    Office 365
    Posts
    104

    Re: Finding data across multiple sheets

    Quote Originally Posted by menem View Post
    How many sheets that you plan to use ?

    Regards.
    I am building a work schedule calendar. Currently for 7 teams, so that is 7*12= 84 sheets. I would like the formula to have the flexibility of accomodating more (or less) teams by just changing the tab reference range.

    Thanks.

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

    Re: Finding data across multiple sheets

    Please try

    =IFERROR(INDEX(FILTERXML("<b><a>"&TEXTJOIN("</a><a>",,CS_Jan:JE_Jan!D4:H15)&"</a></b>","//a"),SEQUENCE(31,3)),"")


    or
    Open Power Query/Get and Transform. Click on New Query.
    Open blank query in the editor, launch Advanced Editor and paste in the following code.

    Change file paht in Blue
    Please Login or Register  to view this content.
    Attached Files Attached Files

  11. #11
    Forum Contributor
    Join Date
    10-08-2018
    Location
    Atlanta, Georgia
    MS-Off Ver
    Office 365
    Posts
    104

    Re: Finding data across multiple sheets

    Thanks for your kind reply.

    The solution that you sent using the above formula (=IFERROR(INDEX(FILTERXML("<b><a>"&TEXTJOIN("</a><a>",,CS_Jan:JE_Jan!D4:H15)&"</a></b>","//a"),SEQUENCE(31,3)),"") ) is not returning the right answers. The solution with the power query editor seems to be right. I will try to adopt that in my file and try, though it looks too complicated for me!

    Thanks again.
    Last edited by AliGW; 07-09-2020 at 01:33 PM. Reason: Please don't quote unnecessarily!

  12. #12
    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,916

    Re: Finding data across multiple sheets

    Administrative Note:

    Please don't quote whole posts, especially when you are responding to the one immediately preceding your own - it's just clutter. It's OK to quote if you are responding to a post out of sequence, but limit quoted content to a few relevant lines that makes clear to whom and what you are responding. Thanks!

    For normal conversational replies, try using the QUICK REPLY box below or the REPLY button instead of REPLY WITH QUOTE.

  13. #13
    Forum Expert
    Join Date
    09-30-2019
    Location
    Chiangmai, Thailand
    MS-Off Ver
    Office 2016, Excel 2019
    Posts
    1,234

    Re: Finding data across multiple sheets

    In this case, I can only use helper column (equal to sheets) to perform data into calc sheet , then populate them to answer area.

    Prepare (retrieve) data to calc sheet.

    Define how many blank row in data sheet & column name at
    I3 = 3 (Mean 3 blank rows in every data sheet)
    J3 = D (Data in column D)

    Define index id of populate table (start from 1 to total sheet +2)
    Note : I have l.margin & r.margin for easy insert to support more data sheets.
    Start at I4 to P4 (1 to 8).

    Enter sheet name in J6 to O6.
    J7 (copy to end of the area)
    =INDIRECT("'"&J$6&"'!"&$J$3&$I$3+$C7)

    * Insert more column if need (and don't forget to rebuild
    Col.ID from 1 to n+2).

    In answer area enter 1, 2, 3 as number of data to show at D5 to F5

    D7 (copy to end of answer area)
    =IFERROR(INDEX($I7:$P7,1,AGGREGATE(15,6,$I$4:$P$4/(1/($I7:$P7>0)),D$5)),"")


    Regards.

    Note : Another way maybe VBA (UDF).
    Attached Files Attached Files

  14. #14
    Forum Contributor
    Join Date
    10-08-2018
    Location
    Atlanta, Georgia
    MS-Off Ver
    Office 365
    Posts
    104

    Re: Finding data across multiple sheets

    Quote Originally Posted by Bo_Ry View Post
    Open blank query in the editor, launch Advanced Editor and paste in the following code.
    Hi Bo_Ry,

    The third column disappeared (i.e., I have only columns 1.1 and 1.2 in the output table) after I pasted the abovementioned code after changing the filepath.

    Any thoughts? Again thanks for taking the trouble to solve my problem.

    Bharath
    Last edited by AliGW; 07-10-2020 at 07:42 AM. Reason: Please don't quote unnecessarily! You can quote part of a post, but you do not need to quote all of it.

  15. #15
    Forum Contributor
    Join Date
    10-08-2018
    Location
    Atlanta, Georgia
    MS-Off Ver
    Office 365
    Posts
    104

    Re: Finding data across multiple sheets

    Quote Originally Posted by menem View Post
    In this case, I can only use helper column (equal to sheets) to perform data into calc sheet , then populate them to answer area.

    Prepare (retrieve) data to calc sheet.
    Hi,

    Thanks for this solution. This works for me. I have two questions-
    1. Is there a way for the column IDs to autocorrect when adding or deleting columns? (Currently, I have to relabel them).
    2. When I insert a new column between the L. and R. Margins, the cells are blank and don't copy the formulae from the adjacent left column automatically. Is there a way to autopopulate the formulas? I tried inserting a table using the data range, yet the formulas didn't autopopulate when I added a column.

    Thanks again for this solution.

    Bharath
    Last edited by AliGW; 07-10-2020 at 09:11 AM. Reason: Please don't quote unnecessarily!

  16. #16
    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,916

    Re: Finding data across multiple sheets

    @ bsrivatsa

    You have been asked NOT to quote unnecessarily, yet you continue to quote entire posts. Please stop doing this! Thank you.

  17. #17
    Forum Expert
    Join Date
    09-30-2019
    Location
    Chiangmai, Thailand
    MS-Off Ver
    Office 2016, Excel 2019
    Posts
    1,234

    Re: Finding data across multiple sheets

    It can't be auto labeling or filling formula.
    But you can pre define all 84 columns (and name
    of all sheets) between L&R margin even that sheet not present.

    Regards

  18. #18
    Forum Contributor
    Join Date
    10-08-2018
    Location
    Atlanta, Georgia
    MS-Off Ver
    Office 365
    Posts
    104

    Re: Finding data across multiple sheets

    Well, I did that because my response was not to the immediate prior message in the thread. Looks like I am misunderstanding you. Anyhow, sorry for the inconvenience. I will stop quoting.

  19. #19
    Forum Contributor
    Join Date
    10-08-2018
    Location
    Atlanta, Georgia
    MS-Off Ver
    Office 365
    Posts
    104

    Re: Finding data across multiple sheets

    @menem. Thanks. I understand.

+ 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: 04-02-2020, 02:28 AM
  2. Finding a Conditional Average on Multiple Sheets
    By ljbrown in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-28-2017, 04:46 PM
  3. Finding Min value of multiple columns in different sheets
    By RorschachDK in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-13-2014, 05:11 PM
  4. [SOLVED] Finding Student Grades in multiple sheets
    By markusshare in forum Excel General
    Replies: 13
    Last Post: 04-20-2013, 05:41 PM
  5. Finding date from multiple sheets
    By truohol in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 10-09-2012, 06:11 AM
  6. Replies: 1
    Last Post: 06-16-2011, 06:35 PM
  7. Finding the average across multiple sheets
    By quailhunter in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 08-14-2006, 07:13 PM

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