+ Reply to Thread
Results 1 to 3 of 3

If formula to gather data from different sheets in a worksheet

  1. #1
    Forum Contributor
    Join Date
    11-28-2011
    Location
    puerto rico
    MS-Off Ver
    Excel 2007
    Posts
    113

    If formula to gather data from different sheets in a worksheet

    Hi!
    I was wondering if someone could help me. I am a teacher and I need to gather info on students engaged in distant learning. I need to use a formula (I was trying with the IF with no luck) to bring the names of students with a 0, 1, 2, 3 from 3 different sheet to another sheet. So for example, I need all names from sheet lsantiago, Dfoster, and Apersaud that have a 0 to go to the sheet 0 students, if they have a 1 go to the sheet 1 students and so on. Can someone help me to figure this out. I attached a demo sheet.

    Thanks!
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor Eastw00d's Avatar
    Join Date
    02-29-2020
    Location
    Breda, NL
    MS-Off Ver
    2016, 2019
    Posts
    833

    Re: If formula to gather data from different sheets in a worksheet

    You can do this with a.o. the AGGREGATE function:
    Please Login or Register  to view this content.
    Per column in the "# students worksheets" you have to change the maximum row, if the worksheet contains more rows (in above case worksheet lsantiago contains 22 rows)
    so if for example the worksheet lsantiago contains 25 rows, you have to change that in each of the 4 "# student"-sheets in the formula in the column lsantiago.


    I have worked this out for your workbook, please see attachment
    Cheers
    Erwin
    Attached Files Attached Files
    Last edited by Eastw00d; 04-30-2020 at 03:50 PM. Reason: additional information
    I started learning VBA because I was lazy ...
    Still developing.... being more lazy...

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

    Re: If formula to gather data from different sheets in a worksheet

    Key Student no. in A1, students sheet name in I1:I3,


    E3 helper column
    =IFERROR("'"&INDEX($I$1:$I$3,SMALL(IF(COUNTIFS(INDIRECT("'"&$I$1:$I$3&"'!B1:B90"),$A$1)>=COLUMN($A$1:$L$1),ROW($I$1:$I$3)),ROWS(E$3:E3)))&"'!","")

    A3:B3
    =IF($E3="","",INDIRECT($E3&"R"&SMALL(IF(INDIRECT($E3&"B1:B90")&""=$A$1&"",ROW($A$1:$A$90)),COUNTIF($E$3:$E3,$E3))&"C",))
    Attached Files Attached Files

+ 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. Gather data multiple sheets into 1 workbook
    By Nnex1996 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-22-2019, 03:37 AM
  2. [SOLVED] Gather data from all sheets using codes
    By YasserKhalil in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-24-2015, 05:26 AM
  3. Gather data from multiple sheets
    By nchinas in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 12-09-2015, 03:57 PM
  4. Gather data across several similar sheets
    By fgruhlke in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-04-2014, 10:16 PM
  5. Gather data based on two conditions from two different sheets
    By nguerra in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-02-2013, 04:09 AM
  6. [SOLVED] gather data from mulitple sheets
    By Qppg in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 09-10-2012, 02:48 PM
  7. Vlookup to gather data from 3 sheets
    By wallace23 in forum Excel General
    Replies: 5
    Last Post: 10-14-2011, 09:29 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