SOLVED

Excel formula Combination

Copper Contributor

Hi

I would like to combine the below 5 formulas in 1 formula, how could i do it?

 

ItemNo. of dateFormula
A14IF(I10="A",14,0)
Z17IF(I11="Z",17,0)
J70IF(I12="J",70,0)
K25IF(I13="K",25,0)
H7IF(I14="H",7,0)

 

Tks!

5 Replies
Perhaps
=Switch(I10, "A", 14, "Z", 17, "J", 70, "K", 25, "H", 7, 0)
best response confirmed by Hans Vogelaar (MVP)
Solution
Maybe:

=IF(I10="A",14,IF(I10="Z",17,IF(I10="j",70,IF(I10="K",25,IF(I10="H",7,0)))))

No switch at my excel, tks
It’s useful, tks!

@QueenieMak_qmsy 

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]

1 best response

Accepted Solutions
best response confirmed by Hans Vogelaar (MVP)
Solution
Maybe:

=IF(I10="A",14,IF(I10="Z",17,IF(I10="j",70,IF(I10="K",25,IF(I10="H",7,0)))))

View solution in original post