+ Reply to Thread
Results 1 to 3 of 3

formula to retrieve all values that fall under Row 1 header name

  1. #1
    Registered User
    Join Date
    06-17-2020
    Location
    Canada
    MS-Off Ver
    2019
    Posts
    27

    formula to retrieve all values that fall under Row 1 header name

    I have multiple sheets (+40) containing questionnaire responses where i'm trying to combine them all into 1 single sheet.

    The main issue is that some sheets have certain questions that others don't, however all sheets follow the same naming convention (i.e. Q1 is always the same across each sheet). I'm looking for a formula that would essentially add all the values from one sheet to another if it has the same question ID.

    In the example excel sheet, i'd essentially want what's in the desired output tab.
    Attached Files Attached Files

  2. #2
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    2,182

    Re: formula to retrieve all values that fall under Row 1 header name

    I think you're going to really struggle to do that with formulas. VBA is reasonably trivial but not sure whether that is an acceptable solution.

    WBD
    Office 365 on Windows 11, looking for rep!

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

    Re: formula to retrieve all values that fall under Row 1 header name

    If you don't mind to use a lot of helper cells.

    Create new sheet for total sheet name listed.
    For my sample , in "SheetList" Range D4:E15

    Helper cells.
    I2
    =IF(L1=K1,IF(MAX(I$1:I1)+1<=SheetList!$G$4,MAX(I$1:I1)+1,0),MAX(I$1:I1))

    J2
    =IF(I2>0,INDEX(SheetList!$D$4:$D$15,I2+1),"")

    K2
    =IF(I2>0,INDEX(SheetList!$E$4:$E$15,I2+1),0)

    L2
    =IF(I2>0,IF(J1<>J2,1,L1+1),0)


    Output area
    A2
    =IF($I2>0,IFERROR(INDEX(INDIRECT("'"&$J2&"'!1:1000000"),$L2+1,MATCH(A$1,INDIRECT("'"&$J2&"'!1:1"),0)),""),"")

    Regards.
    Attached Files Attached Files
    Last edited by menem; 04-12-2022 at 04:52 AM. Reason: Note: If you didn't have all question id listed, my solution won't work.

+ 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. [SOLVED] Formula to retrieve multiple values
    By ChoongKengOn in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 09-12-2021, 09:22 AM
  2. [SOLVED] Retrieve value based on column header
    By Starduzz in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-04-2021, 02:29 AM
  3. [SOLVED] IF formula that allocate values if a coloumns values fall within a certain numeric value
    By Rybags2810 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 02-26-2018, 11:29 AM
  4. Can't automatically retrieve column header in formula
    By Troy73 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 01-05-2018, 10:47 AM
  5. [SOLVED] Formula to add values that fall in a Month
    By bouncingbudha in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-02-2015, 11:33 PM
  6. Replies: 4
    Last Post: 04-05-2008, 10:43 AM
  7. Replies: 1
    Last Post: 01-18-2006, 06:30 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