Forum Discussion
EK_Blackwell
Sep 07, 2021Copper Contributor
IF THEN WHERE statement?
I have two sheets in a workbook. I need to set a cell's value where the ID on one sheet equals the ID on a different sheet. But there's not always going to be a match, they don't line up equally. Is...
- Sep 07, 2021
As a comment, with XLOOKUP we may return entire spill at once
=XLOOKUP(A2:A10,Sheet2!B2:B100,Sheet2!A2:A100, "no such")
DKoontz
Sep 07, 2021Iron Contributor
=XLOOKUP(A2,Sheet2!B:B,Sheet2!A:A)
Will work also. Just drag down.
Will work also. Just drag down.
- EK_BlackwellSep 08, 2021Copper Contributor
Thanks! I entered it and I got 0 back as a value. I'm trying to figure out why because there's an entry it should have picked up
- SergeiBaklanSep 07, 2021Diamond Contributor
As a comment, with XLOOKUP we may return entire spill at once
=XLOOKUP(A2:A10,Sheet2!B2:B100,Sheet2!A2:A100, "no such")
- EK_BlackwellSep 08, 2021Copper Contributor
EDIT: I figured out what I did wrong and the formula is working. Thank you!
- SergeiBaklanSep 08, 2021Diamond Contributor
EK_Blackwell , glad it helped
- DKoontzSep 07, 2021Iron ContributorDidn't know this! I'll actually start using this in my day-to-day work, thanks for explaining!