MillieDeighton
New Member
- Joined
- Jul 17, 2011
- Messages
- 2
i am trying to add together a number of nested if functions. the current formula that i have inputed is as follows:
=IF(C2="A",50,IF(C2="B",25,IF(C2="C",0)))+IF(C3="A",50,IF(C3="B",25,IF(C3="C",0)))+IF(C4="A",50,IF(C4="B",25,IF(C4="C",0)))+IF(C5="A",50,IF(C5="B",25,IF(C5="C",0)))+IF(C6="A",50,IF(C6="B",25,IF(C6="C",0)))
i tried using a sum function to simplify the above equation:
=SUM(C2:C6, IF(C2:C6="A",50,IF(C2:C6="B",25,IF(C2:C6="C",0))))
but it returned<TABLE style="WIDTH: 48pt; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width=64 border=0><COLGROUP><COL style="WIDTH: 48pt" width=64><TBODY><TR style="HEIGHT: 15pt" height=20><TD class=xl65 style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; WIDTH: 48pt; BORDER-BOTTOM: #ece9d8; HEIGHT: 15pt; BACKGROUND-COLOR: white" width=64 height=20>#VALUE!</TD></TR></TBODY></TABLE>
ecxels reason for this is because cells C2 to C6 contain letters.
is there anyway that i can add the if functions for the different cells without having to use the ultra long equation at the top?
thanks to anyone who can help
=IF(C2="A",50,IF(C2="B",25,IF(C2="C",0)))+IF(C3="A",50,IF(C3="B",25,IF(C3="C",0)))+IF(C4="A",50,IF(C4="B",25,IF(C4="C",0)))+IF(C5="A",50,IF(C5="B",25,IF(C5="C",0)))+IF(C6="A",50,IF(C6="B",25,IF(C6="C",0)))
i tried using a sum function to simplify the above equation:
=SUM(C2:C6, IF(C2:C6="A",50,IF(C2:C6="B",25,IF(C2:C6="C",0))))
but it returned<TABLE style="WIDTH: 48pt; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width=64 border=0><COLGROUP><COL style="WIDTH: 48pt" width=64><TBODY><TR style="HEIGHT: 15pt" height=20><TD class=xl65 style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; WIDTH: 48pt; BORDER-BOTTOM: #ece9d8; HEIGHT: 15pt; BACKGROUND-COLOR: white" width=64 height=20>#VALUE!</TD></TR></TBODY></TABLE>
ecxels reason for this is because cells C2 to C6 contain letters.
is there anyway that i can add the if functions for the different cells without having to use the ultra long equation at the top?
thanks to anyone who can help