+ Reply to Thread
Results 1 to 12 of 12

Extract multiple row headers and column headers if criteria is met in multiple columns

  1. #1
    Forum Expert PaulM100's Avatar
    Join Date
    10-09-2017
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    2,108

    Extract multiple row headers and column headers if criteria is met in multiple columns

    I am trying to extract, failing of course, the row header and the column header for each unit that has been closed. So, I am looking for a formula to extract all IDs or days based on the criteria. I've attached a file to explain better.
    Attached Files Attached Files
    Click the * to say thanks.

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

    Re: Extract multiple row headers and column headers if criteria is met in multiple columns

    One way, in B2, copied down:

    =INDEX(Sheet1!$B$1:$H$1,MATCH("Closed",INDEX(Sheet1!$B$2:$H$9,MATCH(Sheet2!A2,Sheet1!$A$2:$A$9,0),),0))
    Attached Files Attached Files
    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

  3. #3
    Forum Expert PaulM100's Avatar
    Join Date
    10-09-2017
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    2,108

    Re: Extract multiple row headers and column headers if criteria is met in multiple columns

    That would be easy Glenn, but unfortunately, I don't know the IDs or the days. Basically I need to extract all IDs that are closed as well as all days similar to a "extract unique formula"

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

    Re: Extract multiple row headers and column headers if criteria is met in multiple columns

    OK... That wasn't clear to me.

    In A2:
    =IFERROR(INDEX(Sheet1!A:A,AGGREGATE(15,6,ROW(Sheet1!$B$2:$H$9)/(Sheet1!$B$2:$H$9="Closed"),ROWS(A$2:A2))),"")

    In B2:
    =IF(A2="","",INDEX(Sheet1!$B$1:$H$1,MATCH("Closed",INDEX(Sheet1!$B$2:$H$9,MATCH(Sheet2!A2,Sheet1!$A$2:$A$9,0),),0)))
    Attached Files Attached Files

  5. #5
    Forum Expert PaulM100's Avatar
    Join Date
    10-09-2017
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    2,108

    Re: Extract multiple row headers and column headers if criteria is met in multiple columns

    Thank you Glenn, I've done some testing and these 2 formulas work great as always. But I encountered an issue. This list gets updated on a week basis from a cube. Therefore, out of 7 days, sometimes we have data unfeed(blanks). How can I include a countif(range, >0) to exclude the returns that do not contain values, and to return only closed without blanks.

  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 2403
    Posts
    44,139

    Re: Extract multiple row headers and column headers if criteria is met in multiple columns

    You've lost me. Can you post a sample sheet illustrating that issue? (I see problems much more easily better than I read about them!!)

  7. #7
    Forum Expert PaulM100's Avatar
    Join Date
    10-09-2017
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    2,108

    Re: Extract multiple row headers and column headers if criteria is met in multiple columns

    I've attached a file with the exact layout as in my actual file and with what I am trying to achieve.
    Attached Files Attached Files

  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 2403
    Posts
    44,139

    Re: Extract multiple row headers and column headers if criteria is met in multiple columns

    Ummm. That looks JUST like the original.. So, I don't yet understand what you're after regarding blank cells.... Some rows contain closed and blank cells, but are still included in your expected results??? Am I missing the point here?

  9. #9
    Forum Expert PaulM100's Avatar
    Join Date
    10-09-2017
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    2,108

    Re: Extract multiple row headers and column headers if criteria is met in multiple columns

    I know is looks fine and I kinda sound crazy. Ok, let me explain from beginning. So the formulas that i have in my actual file have some formulas looking like this:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Obviously there are a lot more complex but I removed the sensitive data.
    Each formula will return a blank, but is cube based. I thought that I may be wrong about this and did some testing using =char(code(one supposedly blank cell)) and looks like it returned a C(code 67).
    I fail to understand how.

  10. #10
    Forum Expert PaulM100's Avatar
    Join Date
    10-09-2017
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    2,108

    Re: Extract multiple row headers and column headers if criteria is met in multiple columns

    Apologies Glenn, fixed the problem. It lies within the underline formulas. The cell is actually returned as closed, but custom formatted. Your formula fixed my issues, I just need to change other formulas. Many thanks for your time and help!

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

    Re: Extract multiple row headers and column headers if criteria is met in multiple columns

    RoFLAO. Reaches for the whiskey bottle....

    Are you saying that in the file attached at Post 5 (are you 100% sure this is the correct attachment???) I should only return data relating to IDs 6 & 7 because they are closed AND there are no blanks in the range??? Or do I pour myself a large one??

  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 2403
    Posts
    44,139

    Re: Extract multiple row headers and column headers if criteria is met in multiple columns

    Just saw Post 10. I might put the bottle back on the shelf again...

+ 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] SUM Unorganized Array based on Multiple Criteria & Multiple Headers
    By Glisten in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-25-2019, 12:56 PM
  2. [SOLVED] formula for multiple split headers of text and numbers to respective headers
    By JEAN1972 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 02-19-2017, 10:17 AM
  3. [SOLVED] extract data with multiple headers and dates in colA
    By roothog in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-03-2015, 07:08 AM
  4. Replies: 2
    Last Post: 06-14-2013, 10:01 AM
  5. Search for value in multiple columns, Return Column Headers
    By Zach51215 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-30-2013, 06:49 AM
  6. Help required in Converting Multiple Rows to Columns and add Column Headers
    By Swaroopa in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-08-2013, 07:39 AM
  7. Help with Converting Multiple Rows to Columns and add Column Headers
    By Lmsloman in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-27-2010, 10: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