Forum Discussion
vinedancer
Sep 30, 2022Copper Contributor
Using IF and VLOOKUP together
I have a workbook where the first sheet has dates in the heading and the data for those columns is on another sheet. I want to combine an If statement to pick up the date, then lookup the items (say ...
Riny_van_Eekelen
Sep 30, 2022Platinum Contributor
vinedancer This syntax should work, though I can't test it if returns the desired result.
=IF($J$5='P&L25.9 '!$C$4,VLOOKUP('2023'!A6,'P&L25.9 '!$A$6:$Z$60,4,0),"-")
It performs the VLOOKUP when the criteria is met or "-" if it is not)
vinedancer
Sep 30, 2022Copper Contributor
OMG you're a genius! Thank you, it worked 🙂