Forum Discussion
QueenieMak_qmsy
Jan 27, 2022Copper Contributor
Excel formula Combination
Hi
I would like to combine the below 5 formulas in 1 formula, how could i do it?
| Item | No. of date | Formula |
| A | 14 | IF(I10="A",14,0) |
| Z | 17 | IF(I11="Z",17,0) |
| J | 70 | IF(I12="J",70,0) |
| K | 25 | IF(I13="K",25,0) |
| H | 7 | IF(I14="H",7,0) |
Tks!
- Maybe:
=IF(I10="A",14,IF(I10="Z",17,IF(I10="j",70,IF(I10="K",25,IF(I10="H",7,0)))))
5 Replies
- PeterBartholomew1Silver Contributor
It is often possible to replace nested IFs by a lookup
= LOOKUP(target, {7,10,14,17,25,70;0, "A","Z","J","H","K"})[XLOOKUP is my favourite but I had to dump my old Excel to get that]
- dewandiCopper ContributorMaybe:
=IF(I10="A",14,IF(I10="Z",17,IF(I10="j",70,IF(I10="K",25,IF(I10="H",7,0)))))- QueenieMak_qmsyCopper ContributorIt’s useful, tks!
- JMB17Bronze ContributorPerhaps
=Switch(I10, "A", 14, "Z", 17, "J", 70, "K", 25, "H", 7, 0)- QueenieMak_qmsyCopper ContributorNo switch at my excel, tks