using =sum() to get a percentage

J

jahaglund

I recently received a spreadsheet that contained =sum(a1/a2)-1+1. The
cell containing the formula was formatted to percentage. I was
wondering why use =sum()-1+1 when +a1/a2 would render the same result
(provided the cell is formatted to percentage)? Thank you
 
G

Guest

I guess whoever created the formula was just throwing things out there to see
what sticks. Sum isn't needed and -1 +1 would cancel out. I would probably
change it to something like =if(a2 = 0, 0, a1/a2)
 
J

joeu2004

I recently received a spreadsheet that contained =sum(a1/a2)-1+1. The
cell containing the formula was formatted to percentage. I was
wondering why use =sum()-1+1 when +a1/a2 would render the same result
(provided the cell is formatted to percentage)?

I cannot explain why anyone would do -1+1. In some (other)
circumstances, perhaps it might convert text to numeric (just a guess);
but that does not seem necessary here. And many people seem put all of
their numeric expressions inside =SUM(...). When I asked this forum
why, I got answers ranging from "it don't hurt, so don't fix it" to
silly rationalizations. The bottom line: only someone who does not
know what they are doing would do either, IMHO. It is good that you
know enough to realize that such expressions are dubious.
 
B

Bob Phillips

No reason, total overkill.

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)
 
B

Bob Phillips

Tad harsh don't you think?

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)
 

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