+ Reply to Thread
Results 1 to 17 of 17

Match & lookup confusion

  1. #1
    Registered User
    Join Date
    04-13-2019
    Location
    Oregon, USA
    MS-Off Ver
    Microsoft Office Home & Student 2019 Version 2301
    Posts
    79

    Match & lookup confusion

    Hello - I am trying to uses MATCH and LOOKUP I believe. I have been trying off and on for two days now and I cannot seem to figure our what to do.

    I enter numbers in cells D5 - G38 I want the formula to look at the reference cells in W4 - X35.

    When I type 22 in cell D5 I want the formula to LOOKUP 22 in the reference cells. Once it finds a MATCH with 22in cell W18 I want it to look at cell X18 and see the 4 there.

    Then I want it to look for a MATCHing 4 in cells J3 - U3 and see that J3 and N3 and put a COUNT of 1 in cells J7 and M7.

    I want the same to happen to the other numbers that I have in cells E5 - G5.

    Thanks for your help.
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,500

    Re: Match & lookup confusion

    Are you still using Excel 2019 or something newer?
    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
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,500

    Re: Match & lookup confusion

    If you have 365, you can use this:

    =LET(f,FILTER(X4:X35,COUNTIF(D5:G5,W4:W35)),BYCOL(J3:U3,LAMBDA(c,IF(ISNUMBER(MATCH(c,f,0)),1,""))))

    Clear all expected results in J7:U7 and then paste the formula into J7. It will spill to fill the row.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    04-13-2019
    Location
    Oregon, USA
    MS-Off Ver
    Microsoft Office Home & Student 2019 Version 2301
    Posts
    79

    Re: Match & lookup confusion

    I am using Microsoft 365 now :-)

  5. #5
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,500

    Re: Match & lookup confusion

    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. You can also access the SOLVED tag by editing the opening post and choosing SOLVED from the drop-down to the left of the title box.

    Also, if you have not already done so, remember that you can reward 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.

  6. #6
    Registered User
    Join Date
    04-13-2019
    Location
    Oregon, USA
    MS-Off Ver
    Microsoft Office Home & Student 2019 Version 2301
    Posts
    79

    Re: Match & lookup confusion

    Yes that did work, but I would have NEVER come up with that formula. That was some real Einstein / Elon Musk type of formula crafting. I am going to have to look up the operators that you put in there. Also, I have never heard of or seen a formula that "spills to fill the row"!!! That was wild.

    I do have a question for you Ali. How do I use that formula all the way down the column J7 - J40? When I dragged the formula down it filled all of the rows below it with the same information. When I entered numbers in the row D - G it did not recognize them.

  7. #7
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,491

    Re: Match & lookup confusion

    For excel 2007++
    Try in J7:

    Please Login or Register  to view this content.
    Drag down and accross
    Attached Files Attached Files
    Quang PT

  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. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,500

    Re: Match & lookup confusion

    Quote Originally Posted by CNL1982 View Post
    I do have a question for you Ali. How do I use that formula all the way down the column J7 - J40?
    Anchor the ranges like this:

    =LET(f,FILTER($X$4:$X$35,COUNTIF($D5:$G5,$W$4:$W$35)),BYCOL($J$3:$U$3,LAMBDA(c,IF(ISNUMBER(MATCH(c,f,0)),1,""))))

    then you can copy down (see attached).

    I am using Microsoft 365 now :-)
    You need to update your forum profile, please.
    Attached Files Attached Files
    Last edited by AliGW; 05-04-2024 at 02:58 AM.

  9. #9
    Registered User
    Join Date
    04-13-2019
    Location
    Oregon, USA
    MS-Off Ver
    Microsoft Office Home & Student 2019 Version 2301
    Posts
    79

    Re: Match & lookup confusion

    Bebo can I ask for your help one more time with this spreadsheet. I really liked how you fixed my issue last time. I liked it so much that I expanded the spreadsheet and and added more columns. I also changed the numbers in cells J8 - BE8. I tried to edit your last formula, but I failed at doing it as you can see in the spreadsheet. If you can help me with this again I would greatly appreciate your help. Thank you Bebo.
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    04-13-2019
    Location
    Oregon, USA
    MS-Off Ver
    Microsoft Office Home & Student 2019 Version 2301
    Posts
    79

    Match & lookup confusion

    On my Corners Expanded (2) tab the COUNT is not working correctly. Someone helped me with this formula, but I cannot figure out how to fix the issue.

    My problem is that if I enter the same number in cells D4 - G4 it only shows a count of 1 in cell L4.

    The COUNT works correctly when I do 4, 13, 22 and 31 in D5 - G5. It just will not work if the same number is entered on the same row.

    Can someone please give me a hand with this formula? Thanks for your help.
    Attached Files Attached Files

  11. #11
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,500

    Re: Match & lookup confusion

    I'll try again:

    =LET(f,MAP($D4:$G4,LAMBDA(c,XLOOKUP(c,$S$2:$S$37,$T$2:$T$37))),BYCOL($I$2:$Q$2,LAMBDA(c,IF(ISNUMBER(MATCH(c,f,0)),SUMPRODUCT((f=c)*(c<>"")),""))))

    Your forum profile STILL doesn't say 365 - please update it without delay.
    Attached Files Attached Files
    Last edited by AliGW; 05-11-2024 at 03:26 AM.

  12. #12
    Registered User
    Join Date
    04-13-2019
    Location
    Oregon, USA
    MS-Off Ver
    Microsoft Office Home & Student 2019 Version 2301
    Posts
    79

    Re: Match & lookup confusion

    WOWOWOWOW AliG!!!! Just WOWOWOW!!! That looks more like a computer program than an excel formula. That is some extremely impressive excel calculations. I did not even know that excel can do lambda. I am just blown away at this solution!!! Thank you very very much Ali!!!

  13. #13
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,500

    Re: Match & lookup confusion

    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. You can also access the SOLVED tag by editing the opening post and choosing SOLVED from the drop-down to the left of the title box.

    Also, if you have not already done so, remember that you can reward 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.

  14. #14
    Registered User
    Join Date
    04-13-2019
    Location
    Oregon, USA
    MS-Off Ver
    Microsoft Office Home & Student 2019 Version 2301
    Posts
    79

    Re: Match & lookup confusion

    I do have just one last question for you Ali. Is it possible to enter Zero as one of those numbers? I noticed when I entered a Zero on the line it killed all 4 entries for that row. Is a Zero needed in the reference cells and a Column just for the Zero also?

  15. #15
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,500

    Re: Match & lookup confusion

    If there is no zero to look up, the formula won't know what to do with it. I wonder how you expected us to know that this could be an option? Were you expecting the formula to magically cope with something else that you hadn't mentioned? We're good, but we are not clairvoyant.

    I suppose you had better explain how you want 0s to be treated if they are entered.

  16. #16
    Registered User
    Join Date
    04-13-2019
    Location
    Oregon, USA
    MS-Off Ver
    Microsoft Office Home & Student 2019 Version 2301
    Posts
    79

    Re: Match & lookup confusion

    Sorry Ali. i was not thinking about the zero. In most of my spreadsheets when I enter a zero it does nothing to the rest of my spreadsheet. With this one if I enter zero it kills all data entry on that line. I have NEVER seen anything like that so I would not know to comment about that. Seeing that happen where it forbids results is something that I have never ever seen before.

    My simple solution will be to just leave that cell blank so it records, but also so it only records 3 inputs instead of 4 since the zero is not part of my count. Thank you.

  17. #17
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,500

    Re: Match & lookup confusion

    Sorry - that doesn't really answer the question.

    The formula uses the data in the lookup columns - if you enter any value that is not there, then the formula will fail. If I understand your requirement correctly, then the best way is to add 0 to the lookup list:

    =LET(f,IFNA(MAP($D4:$G4,LAMBDA(c,XLOOKUP(c,$S$1:$S$37,$T$1:$T$37))),0),BYCOL($I$2:$Q$2,LAMBDA(c,IF(ISNUMBER(MATCH(c,f,0)),SUMPRODUCT((f=c)*(c<>"")),""))))

    Your comments make me think that you just aren't that comfortable with formulae and how they work.
    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. Xlookup or Index/Match Confusion
    By jjward101 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-04-2023, 10:16 PM
  2. VLOOKUP HLOOKUP MATCH confusion with 2 data points
    By formexcel in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-04-2020, 07:49 AM
  3. Lookup tables in Microsoft access (confusion?)
    By danny2000 in forum Access Tables & Databases
    Replies: 9
    Last Post: 03-05-2016, 02:40 AM
  4. [SOLVED] Holy Moley, IF AND INDEX MATCH LEFT confusion
    By bentod in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 06-16-2014, 05:37 PM
  5. IF function or LOOKUP confusion?
    By Tea Boy Sid in forum Excel General
    Replies: 6
    Last Post: 11-14-2011, 07:22 PM
  6. lookup/match confusion
    By kryt0n in forum Excel General
    Replies: 2
    Last Post: 10-01-2010, 09:04 AM
  7. Lookup confusion
    By KeenToLearn in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-12-2005, 02:35 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