Forum Discussion
Thendo91
Nov 07, 2023Copper Contributor
Can I do a IF statement that if true, it completes another formula?
=IF(OR(VLOOKUP(A2,Sheet2!A:E,5,FALSE)="Apples",VLOOKUP(A2,Sheet2!A:E,5,FALSE)="Oranges",VLOOKUP(A2,Sheet2!A:E,5,FALSE)="Bananas"),VLOOKUP(A2,Sheet2!A:F,6,FALSE),0) Essentially I have another tab ...
mtarler
Nov 07, 2023Silver Contributor
short answer is YES. That should definitely work. I don't know why it isn't working for you based on that example. A slightly improvement might be:
=IF(OR(VLOOKUP(A2,Sheet2!A:E,5,FALSE)={"Apples","Oranges","Bananas"}), VLOOKUP(A2,Sheet2!A:F,6,FALSE),0)
I would also recommend you consider XLOOKUP since it is more efficient (at least that is my understanding and this assumed you have Excel 365).
Thendo91
Nov 07, 2023Copper Contributor
Thank you! That looks to have worked. If I had to look up in a further column a term such as "Yes, I Want My Order Supplied In Cardboard Box" and then return a value, I appear to be having the 0 error again. Is it because it's a longer sentence and may need to do a partial match?