Thread: IF Formula
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Wondering[_2_] Wondering[_2_] is offline
external usenet poster
 
Posts: 75
Default IF Formula

This formula returns an empty cell if K2 is not Mar or May. If you want it
to return 0, change the "" to 0

=IF(K2="Mar", SUM(A2:C2),if(K2="May",SUM(A2:E2),""))

"Lisa" wrote in message
...
I need help with the formula.

A B C D E
1 Jan Feb Mar Apr May
2 10 5 15 7 8

If K2 is Mar I need to sum A2 thru C2. If K2 is May I need to sum A2 thru
E2.

Thank you in advance.