+ Reply to Thread
Results 1 to 9 of 9

xlookup or index match from another worksheet from 2 or 3 criteria

  1. #1
    Registered User
    Join Date
    02-07-2024
    Location
    Sydney
    MS-Off Ver
    365
    Posts
    10

    xlookup or index match from another worksheet from 2 or 3 criteria

    Hi, I almost got it but not close enough, so any help appreciated to make the formulas work for the scorecard.
    I've colour coded the cells from the worksheets to help explain the flow.
    Based on the criteria of the Month and Actual or Budget and the account name, such as Total Trading Income, I want it to return the value from the P&L sheet from the column of that month ie Jan, etc from the drop down at G12.
    If possible, it would be great if the months name for LM in E12 and PM in D12 could be auto updated of their names and then also the data returned from the P&L worksheet for those months in the scorecard.
    Also, the Total in M39 comes from the worksheet Aged Receivables, but the report from the accounting system sometimes adds columns or removes them, so the headings move columns, so a moving lookup and return is needed based on the headings / criteria, rather than a static value return.
    Many thanks JB
    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,869

    Re: xlookup or index match from another worksheet from 2 or 3 criteria

    Welcome to the forum.

    Try this:

    =INDEX('P&L 23-24'!$B$7:$AK$60,MATCH($C15,'P&L 23-24'!$A$7:$A$60,0),MATCH(1,('P&L 23-24'!$B$4:$AK$4=D$12)*('P&L 23-24'!$B$6:$AK$6=D$14),0))
    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
    Registered User
    Join Date
    02-07-2024
    Location
    Sydney
    MS-Off Ver
    365
    Posts
    10

    Re: xlookup or index match from another worksheet from 2 or 3 criteria

    Hi AliGW,
    thanks for the welcome. I've read some of these posts before as help on excel but never used one, brave new world...
    Many thanks for the formula.
    That works for when I paste it into Scorecard G15, but when I copy it to cell F15 and align the criteria cell to Budget it returns a #N/A.
    It also returns a #N/A if I leave it in G15 and change the criteria to F14 Budget instead of actual, as a sort of second check.
    So, what I have wrecked in the formula?
    Thanks
    JB

  4. #4
    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,869

    Re: xlookup or index match from another worksheet from 2 or 3 criteria

    Yes, of course, because of your data layout! It won't work unless the criteria are aligned, and yours are only aligned to the middle column of each block.

    Try this:

    AliGW on MS365 Beta Channel (Windows 11) 64 bit

    N
    O
    P
    4
    Nov
    Nov
    Nov
    5
    Nov-23
    6
    Budget
    Actual
    Variation
    7
    $501
    $5,001
            
    8
    $502
    $5,002
    9
    $503
    $5,003
    10
    $504
    $5,004
    11
    $505
    $5,005
    12
    $506
    $5,006
    13
    $507
    $5,007
    14
    $3,528
    $35,028
    993%
    Sheet: P&L 23-24

    If not, attach another copy showing your attempt.
    Last edited by AliGW; 02-07-2024 at 04:06 AM.

  5. #5
    Forum Expert
    Join Date
    10-19-2021
    Location
    Brazil
    MS-Off Ver
    Office 365 V2401 w/ Win10 Home 64 Bit
    Posts
    2,014

    Re: xlookup or index match from another worksheet from 2 or 3 criteria

    For the budget you could do the following fix.

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    02-07-2024
    Location
    Sydney
    MS-Off Ver
    365
    Posts
    10

    Re: xlookup or index match from another worksheet from 2 or 3 criteria

    awesome, thank you. With the alignment part, is that because the Jan is the centre column, but Budget is one column to the left?
    Therefore, would it be more robust to call each column in its full name, such as Jan Actual and Jan Budget...?

  7. #7
    Registered User
    Join Date
    02-07-2024
    Location
    Sydney
    MS-Off Ver
    365
    Posts
    10

    Re: xlookup or index match from another worksheet from 2 or 3 criteria

    ah, sorry, just cottoned on to what your image inclusion says, got it and will do. many thanks, appreciate it.

  8. #8
    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,869

    Re: xlookup or index match from another worksheet from 2 or 3 criteria

    Glad to have helped.

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, if you have not already done so, you may not be aware that you can thank anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of each of those who offered help.

  9. #9
    Forum Expert
    Join Date
    10-19-2021
    Location
    Brazil
    MS-Off Ver
    Office 365 V2401 w/ Win10 Home 64 Bit
    Posts
    2,014

    Re: xlookup or index match from another worksheet from 2 or 3 criteria

    Glad to have helped.

+ 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] Help Pulling Data - Xlookup? Index & Match? VBA?
    By Chelle0118 in forum Excel General
    Replies: 4
    Last Post: 05-23-2023, 03:59 PM
  2. Xlookup or Index/Match Confusion
    By jjward101 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-04-2023, 10:16 PM
  3. xlookup vs match/Index
    By lastnn30 in forum Excel General
    Replies: 3
    Last Post: 08-05-2022, 03:30 AM
  4. Do I use an INDEX/MATCH function or XLOOKUP for this example?
    By Majestic1976 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-13-2021, 08:57 AM
  5. Index/Match vs Xlookup
    By lastnn30 in forum Excel General
    Replies: 3
    Last Post: 11-28-2021, 01:53 PM
  6. XLOOKUP vs INDEX & MATCH?
    By andrewc in forum Excel General
    Replies: 9
    Last Post: 08-26-2021, 10:59 AM
  7. Replies: 7
    Last Post: 10-03-2019, 11:23 AM

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