Forum Discussion

Kelly1992's avatar
Kelly1992
Copper Contributor
Jan 24, 2020

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

  • 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
  • Charla74's avatar
    Charla74
    Iron Contributor

    Kelly1992  you can do this with a nested formula, i.e. in cell B2 as follows

    =IF($A2=100, 200, IF($A2=200, 300, IF($A2=300, 400, IF($A2=400, 500, IF($A2=500, 600, FALSE)))))

Resources