Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Ted Rogers
 
Posts: n/a
Default Why should you never use '=sum(A1+A2)'?

I attended an Excel training course yesterday and looking through the
handout this morning noticed these lines in the overview:

'.......when to use '=A1+A2' and when to use '=sum(A1:A10)' and why you
should never use '=sum(A1+A2)'. I can't for the life of me remember the
trainer's explanation and can't find the answer anywhere. Could anyone help
please?

Ted


  #2   Report Post  
JE McGimpsey
 
Posts: n/a
Default

The SUM() function is superfluous in this case. Example:

A1: 5
A2: 6
A3: =A1 + A2 ==== 11
A4: =SUM(A1 + A2) === SUM(11) ==== 11


In article ,
"Ted Rogers" wrote:

I attended an Excel training course yesterday and looking through the
handout this morning noticed these lines in the overview:

'.......when to use '=A1+A2' and when to use '=sum(A1:A10)' and why you
should never use '=sum(A1+A2)'. I can't for the life of me remember the
trainer's explanation and can't find the answer anywhere. Could anyone help
please?

  #3   Report Post  
Bob Phillips
 
Posts: n/a
Default

Because you are effectively trying to do the same command twice

A1+A2 is summing those two cells,
SUM is also saying to sum them

You get the correct answer because the A1+A2 is resolved before the SUM acts
upon it, but it is unnecessary, and will be inefficient in a large
spreadsheet.

--
HTH

Bob Phillips

"Ted Rogers" wrote in message
...
I attended an Excel training course yesterday and looking through the
handout this morning noticed these lines in the overview:

'.......when to use '=A1+A2' and when to use '=sum(A1:A10)' and why you
should never use '=sum(A1+A2)'. I can't for the life of me remember the
trainer's explanation and can't find the answer anywhere. Could anyone

help
please?

Ted




  #4   Report Post  
Dave Peterson
 
Posts: n/a
Default

=sum() ignores cells with text in them:

A1: ASDF
A2: 3

=sum(a1:a2) will return 3
=sum(a1+a2) will return a #value! error
(because a1+a2 will return a #value! error)


Ted Rogers wrote:

I attended an Excel training course yesterday and looking through the
handout this morning noticed these lines in the overview:

'.......when to use '=A1+A2' and when to use '=sum(A1:A10)' and why you
should never use '=sum(A1+A2)'. I can't for the life of me remember the
trainer's explanation and can't find the answer anywhere. Could anyone help
please?

Ted


--

Dave Peterson
  #5   Report Post  
Ted Rogers
 
Posts: n/a
Default


"Dave Peterson" wrote in message
...
=sum() ignores cells with text in them:

A1: ASDF
A2: 3

=sum(a1:a2) will return 3
=sum(a1+a2) will return a #value! error
(because a1+a2 will return a #value! error)

Many thanks to everyone for your kind help - I appreciate it.

Ted


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 11:41 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"