Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
bloop
 
Posts: n/a
Default Excel conditional sum

I have a two colums with values, A contains numbers from 1 to 10, B contains
numerique values. Now I would like to make the sum of the values in B
depending on the value in A, e.g. sum of all values in B fot which the
content in A < 5
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Coderre
 
Posts: n/a
Default Excel conditional sum

Try something like this:

C1: =SUMIF(A:A,"<5",B:B)

Does that help?

***********
Regards,
Ron

XL2002, WinXP-Pro


"bloop" wrote:

I have a two colums with values, A contains numbers from 1 to 10, B contains
numerique values. Now I would like to make the sum of the values in B
depending on the value in A, e.g. sum of all values in B fot which the
content in A < 5

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
bloop
 
Posts: n/a
Default Excel conditional sum

Sorry, I was to fast, this method works also!

Thank you very much!

Bloop

"Ron Coderre" wrote:

Try something like this:

C1: =SUMIF(A:A,"<5",B:B)

Does that help?

***********
Regards,
Ron

XL2002, WinXP-Pro


"bloop" wrote:

I have a two colums with values, A contains numbers from 1 to 10, B contains
numerique values. Now I would like to make the sum of the values in B
depending on the value in A, e.g. sum of all values in B fot which the
content in A < 5

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Roberto
 
Posts: n/a
Default Excel conditional sum

=SUMPRODUCT(--(A1:A10<5),--(B1:B10))

Roberto

"bloop" ha scritto nel messaggio
...
:I have a two colums with values, A contains numbers from 1 to 10, B contains
: numerique values. Now I would like to make the sum of the values in B
: depending on the value in A, e.g. sum of all values in B fot which the
: content in A < 5


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
bloop
 
Posts: n/a
Default Excel conditional sum

Yes that was it! thanks so much!

bloop

"Roberto" wrote:

=SUMPRODUCT(--(A1:A10<5),--(B1:B10))

Roberto

"bloop" ha scritto nel messaggio
...
:I have a two colums with values, A contains numbers from 1 to 10, B contains
: numerique values. Now I would like to make the sum of the values in B
: depending on the value in A, e.g. sum of all values in B fot which the
: content in A < 5





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips
 
Posts: n/a
Default Excel conditional sum

No, no. Ron gave you the proper answer.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"bloop" wrote in message
...
Yes that was it! thanks so much!

bloop

"Roberto" wrote:

=SUMPRODUCT(--(A1:A10<5),--(B1:B10))

Roberto

"bloop" ha scritto nel messaggio
...
:I have a two colums with values, A contains numbers from 1 to 10, B

contains
: numerique values. Now I would like to make the sum of the values in B
: depending on the value in A, e.g. sum of all values in B fot which the
: content in A < 5





  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Roberto
 
Posts: n/a
Default Excel conditional sum


"Bob Phillips" ha scritto nel messaggio
...
: No, no. Ron gave you the proper answer.
:
Just to improve my Excel: why SUMIF is better than SUMPRODUCT?
Roberto


  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips
 
Posts: n/a
Default Excel conditional sum

Because it is optimised for conditional counting, so when you only have one
condition, use SUMIF. SUMPRODUCT is good for multiple conditions, but the --
is coercing a TRUE/FALSE result to 1/0 so that it can do the product can be
executed. It also looks more intuitive, no --.

I just did a quick test, and in this SUMIF was quicker than SUMPRODUCT by a
factor of some 42%.

That is why it is better in the right circumstances.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Roberto" <schebobchiocciolatinpuntoit wrote in message
...

"Bob Phillips" ha scritto nel

messaggio
...
: No, no. Ron gave you the proper answer.
:
Just to improve my Excel: why SUMIF is better than SUMPRODUCT?
Roberto




  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ashish Mathur
 
Posts: n/a
Default Excel conditional sum

Hi,

You may use a sum(if( array formula (Ctrl+Shift+Enter)

=sum(if(rangeA<=5,rangeB))

Regards,

"bloop" wrote:

I have a two colums with values, A contains numbers from 1 to 10, B contains
numerique values. Now I would like to make the sum of the values in B
depending on the value in A, e.g. sum of all values in B fot which the
content in A < 5

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2003 FAILS, but Excel 2000 SUCCEEDS ??? Richard Excel Discussion (Misc queries) 2 May 13th 23 11:46 AM
Why doesn't Excel allow conditional formats to be saved after cer. Guatama100 Excel Discussion (Misc queries) 1 January 5th 06 01:27 AM
TRYING TO SET UP EXCEL SPREADSHEET ON MY COMPUTER MEGTOM New Users to Excel 5 October 27th 05 03:06 AM
how do I apply more than 3 conditional formats in excel chetwyndthomas Excel Discussion (Misc queries) 1 January 30th 05 04:24 PM
Is it possible to do a conditional subtotal in Excel? LTS_Bgobien Excel Worksheet Functions 6 November 16th 04 11:12 PM


All times are GMT +1. The time now is 03:34 AM.

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

About Us

"It's about Microsoft Excel"