Forum Discussion
Annie_Mansfield
Jan 16, 2020Copper Contributor
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
- mathetesGold Contributor
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.
- SergeiBaklanDiamond Contributor
- Riny_van_EekelenPlatinum Contributor
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.
- Annie_MansfieldCopper Contributor🙌🙌🙌 thankyou!