Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default Sum.If function but depending on 3 different columns?

I hope someone can help me out he
I have 2 worksheets:
WS1
WS2

On WS2 I need to sum all values of column D on WS1 that have:
WS1 column A = 1
WS1 column B = 3
WS1 column C <= 7

Is this possible and if yes, how can I accomplish this?

Thanks in advance.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default Sum.If function but depending on 3 different columns?

=SUMPRODUCT(--(A2:A200=1),--(B2:B200=3),--(C2:C200<=7),D2:D200)


--


Regards,


Peo Sjoblom



"corne_mo" wrote in message
...
I hope someone can help me out he
I have 2 worksheets:
WS1
WS2

On WS2 I need to sum all values of column D on WS1 that have:
WS1 column A = 1
WS1 column B = 3
WS1 column C <= 7

Is this possible and if yes, how can I accomplish this?

Thanks in advance.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default Sum.If function but depending on 3 different columns?

Hi Peo,

just did a very small test and it looks like it works although the
sumproduct function isn't made for this purpose as far as I know.
Can you explain me the function you give above, including the -- part?
Thanks in advance.
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default Sum.If function but depending on 3 different columns?

http://www.xldynamic.com/source/xld.SUMPRODUCT.html


--


Regards,


Peo Sjoblom



"corne_mo" wrote in message
...
Hi Peo,

just did a very small test and it looks like it works although the
sumproduct function isn't made for this purpose as far as I know.
Can you explain me the function you give above, including the -- part?
Thanks in advance.



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default Sum.If function but depending on 3 different columns?

Many thanks ! :-))


  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default Sum.If function but depending on 3 different columns?

Still one questions though:
I tried this over multiple worksheets, where the table is on worksheet1 and
the formula in worksheet 2:
=SUMPRODUCT(--(WS1!A1:A14=1);--(WS1!B:B="b");--(WS!C:C<9);WS1!D1:D14)

The following statements give errors:
--(WS1!B:B="b")
--(WS!C:C<9)

What am I doing wrong here?
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default Sum.If function but depending on 3 different columns?

Thanks for the feedback


--


Regards,


Peo Sjoblom



"corne_mo" wrote in message
...
Many thanks ! :-))



  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default Sum.If function but depending on 3 different columns?

You can not use the whole column in array formulas or formulas that work
like array formulas
also the ranges need to be of equal size

maybe something like

=SUMPRODUCT(--(WS1!A1:A65535=1);--(WS1!B1:B65535="b");--(WS1!C1:C65535<9);WS1!D1:D65535)

or

=SUMPRODUCT(--(WS1!A1:A14=1);--(WS1!B1:B14="b");--(WS1!C1:C14<9);WS1!D1:D14)


--


Regards,


Peo Sjoblom



"corne_mo" wrote in message
...
Still one questions though:
I tried this over multiple worksheets, where the table is on worksheet1
and
the formula in worksheet 2:
=SUMPRODUCT(--(WS1!A1:A14=1);--(WS1!B:B="b");--(WS!C:C<9);WS1!D1:D14)

The following statements give errors:
--(WS1!B:B="b")
--(WS!C:C<9)

What am I doing wrong here?



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
function to count the amount of cells depending on part of the cell entry Andyd74 Excel Worksheet Functions 5 May 25th 06 11:12 AM
Function or number depending on input Jan Jansens Excel Worksheet Functions 7 September 7th 05 12:40 PM
Help with function to sum values in a worksheet depending on account number Dab Excel Worksheet Functions 4 June 7th 05 10:08 PM
min function from different columns sonofroy Excel Worksheet Functions 8 May 6th 05 10:16 PM
changing a cell value depending on an If Function/Lookup Chris Excel Worksheet Functions 2 November 9th 04 07:41 AM


All times are GMT +1. The time now is 06:26 PM.

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"