+ Reply to Thread
Results 1 to 10 of 10

Array to find cell data based on two variables

  1. #1
    Forum Contributor
    Join Date
    05-27-2014
    Posts
    141

    Array to find cell data based on two variables

    Hi All,

    I am looking to do two formula's and I can not seem to get the array's right. I know it is an array and I have scrolled through all the previous help I have had but can not seem to find it so i have come to you all for assistance.

    On the template file I have put here I have balnk out all the other workings and sensetive data but here is what i am trying to achieve is to have a one week view of the schedule based on any date range and a list of those who are in (represented by x) on the current day


    Formula 1;

    In formula sheet range B4:H9 I am trying to create a formula that looks at the persons name in column A and the dates in Row 2 and then match those against the same criteria in sheet two to reveal the corresponding cell values.

    Formula 2;

    In Column L is there a way to list all persons name who has an X on the the current days date listed in the range B4:H9

    It would be a great help if anyone can assist in this one please, it is part of a large allocation project but I can not resolve this by Vlookups and Arrays as hard as I try are not my friend.

    Thanks in advance

    Danny

    (Note to admins, I have previoulsy posted this in catastrophic error wit the data link still in play and it created problems so i have reworded and reasked)
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,153

    Re: Array to find cell data based on two variables

    Formula 1

    in B4

    =IFERROR(INDEX('RAW SCHEDULE'!$C$4:$BV$9,MATCH($A4,'RAW SCHEDULE'!$A$4:$A$9,0),MATCH(B$2,'RAW SCHEDULE'!$C$1:$BV$1,0)),"")

    Enter with Ctrl+Shift+Enter (array formula) and then copy across and down

    Formula 2

    in L4

    =IFERROR(INDEX('RAW SCHEDULE'!$C$4:$BV$9,MATCH($A4,'RAW SCHEDULE'!$A$4:$A$9,0),MATCH($M$3,'RAW SCHEDULE'!$C$1:$BV$1,0)),"")

    Enter with Ctrl+Shift+Enter (array formula) and then copy down
    Attached Files Attached Files

  3. #3
    Forum Contributor
    Join Date
    05-27-2014
    Posts
    141

    Re: Array to find cell data based on two variables

    Formula one is perfect thank you, formula two reveals X's what i was trying to achieve is the list of names who has an X on that specific day

    Thanks

    Danny

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,153

    Re: Array to find cell data based on two variables

    Formula 2

    =IFERROR(INDEX('RAW SCHEDULE'!$A$4:$A$9,SMALL(IF(INDEX('RAW SCHEDULE'!$C$4:$BV$9,,MATCH($M$3,'RAW SCHEDULE'!$C$1:$BV$1,0))="X",ROW($A$4:$A$9)-ROW($A$4)+1,""),ROWS($A$4:A4))),"")

    Enter with Ctrl+shift+Enter

    Sorry about error .. senior moment!!

  5. #5
    Forum Expert
    Join Date
    12-09-2014
    Location
    Trakai, Lithuania
    MS-Off Ver
    2016
    Posts
    1,287

    Re: Array to find cell data based on two variables

    Another option without an array formula.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Array to find cell data based on two variables

    From what I can see, formula 1 does not need to be ARRAY entered?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  7. #7
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,153

    Re: Array to find cell data based on two variables

    Ford,
    You're right re Formula 1- my mistake.

    Too many senior moments : age catching up !

    John

  8. #8
    Forum Contributor
    Join Date
    05-27-2014
    Posts
    141

    Re: Array to find cell data based on two variables

    Thats brilliant guys, these formulas were adapted slightly to encompass the whole sheet but it worked great. With formula two currently looking at X is there a way to adapt it so that the match is either X or N

  9. #9
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,153

    Re: Array to find cell data based on two variables

    If the values can only be "X" or "N" then we could test for "not blank" ....

    =IFERROR(INDEX('RAW SCHEDULE'!$A$4:$A$9,SMALL(IF(INDEX('RAW SCHEDULE'!$C$4:$BV$9,,MATCH($M$3,'RAW SCHEDULE'!$C$1:$BV$1,0))<>"",ROW($A$4:$A$9)-ROW($A$4)+1,""),ROWS($A$4:A4))),"")

  10. #10
    Forum Contributor
    Join Date
    05-27-2014
    Posts
    141

    Re: Array to find cell data based on two variables

    Thats brilliant but what I have done is kept the X and N into two different columns because of what they represent. I just want to say a massive thank you to you guys and all the others that have help over the time. what this excel file does is truley amazing from my point of view and it couldnt of been done without the help & tuition of the Excelforum Community

+ 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] Retrieve Data From Cell Based in Array Based on LARGE Function
    By justarandomguy in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-13-2014, 02:31 AM
  2. Replies: 2
    Last Post: 08-18-2014, 05:20 AM
  3. Find Max Date from an array populated by variables
    By SheldonVBA in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-15-2014, 07:25 AM
  4. Create List of Variables based on Unique Values in an Array
    By jmartineau in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-05-2013, 06:02 PM
  5. [SOLVED] Find last value in an array based on adjacent cell
    By DRFILL in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-15-2013, 03:08 PM
  6. [SOLVED] find data based NOT on the first column of my array
    By vizzkid in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-16-2013, 08:59 AM
  7. Paste data into cell based on date variables
    By tanewha69 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-05-2006, 06:44 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