Forum Discussion
Kelly1992
Jan 24, 2020Copper Contributor
Creating a IF, Then And formula
Im trying to create a formula that has multiple variables, I have 2 cells( A2 and B2), A2 can have different variables, for example A2 can = 100 or 200 or 300 or 400 or 500, Cell B2 must then change according to the value in A2, Example: If A2 = 100 then B2 must be 200 but if A2 = 200 then B2 must be 300 and so on for all 5 variables.
4 Replies
- Patrick2788Silver Contributor
=VLOOKUP(A2,{100,200;200,300;300,400;400,500;500,6000},2,0)
- If you have Office 365 of Excel 2019 versions, you can use the IFS function as follows:
=IFS(A2=100,200,A2=200,300,A2=300,400,A2=400,500,A2=500,600)
That will eliminate the Nested IF statement - Riny_van_EekelenPlatinum Contributor