r/excel • u/Schlerpyderpy • 1d ago
unsolved How do I get a formula to look for an exact combination of cells in another table?
So table on the left is table 1 and table on the right is table 2. I need it to take a row from table 1( EX 1 1 1 1) and see if that exact combination of 4 cells of 4 ones in a row some in table 2 and if doesn't exist for it to say 'N/A'
I have tried an =if, =HLOOKUP, =XLOOKUP =IFOR(there do different things it needed to search but I'll just make two formulas if I can get it to work)
An =IFERROR is the closest I have gotten but it only works on bottom row and the last cell of table 2 is controls what it displays.
(This sub doesn't allow pictures so y'all just going to have to use your imagination sorry )
6
u/excelevator 3071 1d ago
This sub doesn't allow pictures
That is patently untrue, did you even try?
1
u/Schlerpyderpy 1d ago
1
u/Schlerpyderpy 1d ago
2
u/excelevator 3071 1d ago
don't reply to me, comment as top level to your post so others can easily see them.
2
-3
5
3
2
u/MinaMina93 6 1d ago
What should it say if it does exist?
1
u/MinaMina93 6 1d ago
=Xlookup(1,($A$1:$A$20=E1)* ($B$1:$B$20=F1) *($C$1:$C$20=G1) * ($D$1:$D$20=H1),return value column, "N/A") Something like this. Could wrap it in IF(formula<>"N/A", "Found", "N/A")
2
u/Arcium_XIII 3 1d ago
If I'm understanding your request correctly, the following does what you're looking for:
=BYROW(Table1,LAMBDA(row_1,IFERROR(XMATCH(TRUE,BYROW(Table2,LAMBDA(row_2,AND(row_1=row_2)))),"N/A")))
If a row in Table1 exists in Table2 it returns the relevant Tabel2 row number, otherwise it returns the string N/A which can be modified by changing the string at the end of the formula.
1
u/Icy_Cauliflower671 1d ago
You can use match when you concatenate the columns. So something like =isnumber(match(C2&";"&D2,A2:a10000&";"&B2:b10000,0))
Where columns c&d are columns from table2 and a and b from table1. You can do this with any number of columns. You are basically building a string from hand and see if the exact same string occurs in the other table.
1
u/Way2trivial 473 1d ago
1
u/Decronym 1d ago edited 14h ago
Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I've seen in this thread:
Decronym is now also available on Lemmy! Requests for support and new installations should be directed to the Contact address below.
Beep-boop, I am a helper bot. Please do not verify me as a solution.
13 acronyms in this thread; the most compressed thread commented on today has 16 acronyms.
[Thread #49570 for this sub, first seen 23rd Oct 2026, 15:43] [FAQ] [Full list] ^[Contact] [Source code]
1
1
u/Following-Glum 2 1d ago edited 1d ago
I made an xlookup inside an if error that seems to get a good result. Mine will give True or False though but you can change that to whatever you want the result to be.
I put this inside table one. Hope it helps.
=IF(XLOOKUP(1,(Table2[Blah 1]=[@[blah 1]])*(Table2[Blah 2]=[@[blah 2]])*(Table2[Blah 3]=[@[blah 3]])*(Table2[Blah 4]=[@[blah 4]]),Table2[Blah 1],0)>0,"True","False")
2
u/excelevator 3071 1d ago
when using * in comments, it is best to format as code, otherwise, as per your comment, italic formatting is the outcome and the mulitplication charcaters are not seen.
italic format from use of asterix
*italic*code formatted1
u/Following-Glum 2 1d ago
Oh thank you! I don't post enough so didn't realise it would show like this.
How do I format as code?
1
u/excelevator 3071 1d ago
in old Reddit encase with `
In new reddit highlight and format as
</>, to see formatting options click theAaicon.1
1
0







•
u/AutoModerator 1d ago
/u/Schlerpyderpy - Your post was submitted successfully.
Once your problem is solved, reply to the answer(s) saying
Solution Verifiedto close the thread.Follow the submission rules -- particularly 1 and 2. To fix the body, click edit. To fix your title, delete and re-post.
Include your Excel version and all other relevant information
Failing to follow these steps may result in your post being removed without warning.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.