Forum Discussion
IF + XLOOKUP Formula
Hello,
I am trying to put 2 formulas together. I have gotten the XLOOKUP formula to work perfectly, but not when I added the IF statement (only if the column says "HS").
=XLOOKUP(A3,'Automated Stats'!B:B,'Automated Stats'!F:F) but only return if F:F says "HS" if not then return blank
=IF(XLOOKUP(A3,'Automated Stats'!B:B,'Automated Stats'!F:F),"HS","") but it returns #VALUE!
Update: I added an Example file of what I need. Thank you.
8 Replies
- Riny_van_EekelenPlatinum Contributor
catherine9910 Try it this way:
=IF(XLOOKUP(A3,'Automated Stats'!B:B,'Automated Stats'!F:F)="HS","HS","")
- catherine9910Brass ContributorXLOOKUP formula is the value that I want it to return if column F:F is "HS"
- Riny_van_EekelenPlatinum Contributor
catherine9910 Column F:F is the return array, so when the returned value from XLOOKUP = "HS" you have found what you are looking for, and you want the formula to return "HS". If the value found in F:F is not "HS" you want to return "". But perhaps I don't get it. Sorry.