How do I sum values returned from functions?

D

Duff Divot

I am setting up a simple golf scorecard and assigning "points" to pars,
birdies, etc. in an effort to pair players in a partnership competition based
on recent performance. One of the functions to assign points is
=IF(B3=4,"2",IF(B3=3,"3",IF(B3=2,"4",IF(B3=5,"1",IF(B3>5,"0"))))). I want to
total the points assigned for each hole but I am unable to do so with the SUM
function, it just returns "0". I read in the "Help" somewhere that it ignores
values returned from functions. Is there a way to override this and get the
function to read the values? I have never built a Macro but would that be a
solution? I want to retain the worksheet as a template so I would like to be
able to have it perform the functions without rebuilding the worksheet.
Thanks for any suggestions.
Duff Divot
 
C

CLR

Take the quotation marks out of your formula and it will SUM. They turned
the results into TEXT, which will not SUM.
Use this....

=IF(B3=4,2,IF(B3=3,3,IF(B3=2,4,IF(B3=5,1,IF(B3>5,0)))))

Vaya con Dios,
Chuck, CABGx3
 
D

Duff Divot

That was easy, I guess I was looking for a difficult answer. Thanks to you
for helping me out. It usually takes an independent set of eyes to see the
obvious. Thanks again.
 
K

Ken Wright

or

=MAX(6-B3,0)

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

------------------------------­------------------------------­----------------
It's easier to beg forgiveness than ask permission :)
------------------------------­------------------------------­----------------
 
K

Ken Wright

Assuming B3 can't be less than 0 of course, though that can also be catered
for.

Regards
Ken...................
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top