Forum Discussion
Adding IF cells.
Hi all.
I have a column using an IF formula to create a value. I then want to add those values; however, as they are not numbers (even though the cell is formatted as such), I cannot get them to autosum.
Example:
Cell E2=IF(D2=M$2,"0", IF(D2=M$3, "5",IF(D2=M$4,"10",IF(D2=M$5,"15"))))--this cell now shows '10'.
Cell E3=IF(D3=M$2,"0", IF(D3=M$3, "3",IF(D3=M$4,"6",IF(D3=M$5,"9"))))--this cell now shows '3'.
How do I get Cell E4 to automatically add up cells E2 & E3 to show 13? I have used E4=SUMIF(E2:E3) and SUMIFS(E2:E3) but get a message saying I have entered too few arguments.
Many thanks
Dave
Just use numbers in source formulae, not texts. Like
=IF(D2=M$2,0, IF(D2=M$3, 5,IF(D2=M$4,10,IF(D2=M$5,15))))
2 Replies
- SergeiBaklanDiamond Contributor
Just use numbers in source formulae, not texts. Like
=IF(D2=M$2,0, IF(D2=M$3, 5,IF(D2=M$4,10,IF(D2=M$5,15))))- DavidWhitcherCopper Contributor
Perfect. Thank you. I put the quotation marks in to produce the result. Now they're removed, it works a treat.
Many thanks
Dave