Forum Discussion

Annie_Mansfield's avatar
Annie_Mansfield
Copper Contributor
Jan 16, 2020

If Then Formula help

Hi excel elite,

 

I am trying to work out a formula:

 

If cell K7 is 1, then F7 + 14,

if cell K7 is 2, then F7 + 42,

if cell K7 is 3, then F7 + 56.

 

Thanks for your time!

 

Annie

4 Replies

  • mathetes's avatar
    mathetes
    Gold Contributor

    Annie_Mansfield 

     

    Yet another approach which is kind of neat IF and WHEN the numbers in K7 are integers in sequence, or at least close to one another, and beginning with 1.

    =CHOOSE(K7,14,42,56)

     

    The CHOOSE function can work with scattered numbers, but makes the most sense when they're in a fairly tight series. So if the entries in K7 would be, say 1,3,5,7,9.... you could use =CHOOSE(K7,14,,42,56,,64,,77)  Note the ",," double commas to indicate we're skipping an integer.

  • Riny_van_Eekelen's avatar
    Riny_van_Eekelen
    Platinum Contributor

    Annie_Mansfield 

    Could be like this:

     

     

    =(K7=1)*(F7+14)+(K7=2)*(F7+42)+(K7=3)*(F7+56)
    
    or
    
    =IFS(K7=1,F7+14,K7=2,F7+42,K7=3,F7+56)

     

     

    Just two examples. Same answer, different approach.

     

     

Resources