Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35
Default Sumproduct problem

I'm having a difficult time with the following sumproduct calculation.

The main problem is that I want to sum all cells in column S, that do
not have a value present in the corresponding row in column I. Column
I is sparely populated with some values, the majority of column I has
empty cells. But it's very important that I only calculate column S
where no value is present in column I.

Column D contains names that match cell Y34, column K and N are start
and end dates.

=IF($I$2:$I$4139<"",0,SUMPRODUCT(--($D$2:$D$4139=Y34)*($S$2:$S
$4139),--($K$2:$K$4139=$Y$6),--($N$2:$N$4139<=$Y$7)))

Any help would be greatly appreciated.

Thanks
burl_rfc
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Sumproduct problem

Try this

=SUMPRODUCT((I2:I4139="")*(D2:D4139=Y34)*(K2:K4139 =Y6)*(N2:N4139<=Y7)*(S2:S4139))

Mike

"burl_h" wrote:

I'm having a difficult time with the following sumproduct calculation.

The main problem is that I want to sum all cells in column S, that do
not have a value present in the corresponding row in column I. Column
I is sparely populated with some values, the majority of column I has
empty cells. But it's very important that I only calculate column S
where no value is present in column I.

Column D contains names that match cell Y34, column K and N are start
and end dates.

=IF($I$2:$I$4139<"",0,SUMPRODUCT(--($D$2:$D$4139=Y34)*($S$2:$S
$4139),--($K$2:$K$4139=$Y$6),--($N$2:$N$4139<=$Y$7)))

Any help would be greatly appreciated.

Thanks
burl_rfc

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35
Default Sumproduct problem

Mike H,

Thanks it worked a treat.

But why is the "*" working in this case, I've always used "," to
separate the statements?

Thanks

burl_h
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Sumproduct problem

Hi,

It's just an alternative syntax for sumproduct, both have their uses.

the website seems to be having problems at the moment but have a look here
for help on sumproduct

http://www.xldynamic.com/

Mike

"burl_h" wrote:

Mike H,

Thanks it worked a treat.

But why is the "*" working in this case, I've always used "," to
separate the statements?

Thanks

burl_h

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,346
Default Sumproduct problem

Hi,

The other syntax will work just as well and there are times when, with a
slight modification, it would prevent a problem that the * syntax would
generate. So this is equivalent:

=SUMPRODUCT(I$2:I$4139="",D$2:D$4139=Y34,K$2:K$413 9=Y$6,N$2:N$4139<=Y$7,S$2:S$4139)

as is this, which is slightly safer in some cases:

=SUMPRODUCT(--(I$2:I$4139=""),--(D$2:D$4139=Y34),--(K$2:K$4139=Y$6),--(N$2:N$4139<=Y$7),S$2:S$4139)


Minor points, in both syntaxes you can drop the final ()'s as shown above.
If you are copying downward you only need absolutes ($) in front of the row
numbers.

--
If this helps, please click the Yes button

Cheers,
Shane Devenshire


"burl_h" wrote:

Mike H,

Thanks it worked a treat.

But why is the "*" working in this case, I've always used "," to
separate the statements?

Thanks

burl_h

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
sumproduct problem [email protected] Excel Worksheet Functions 6 December 12th 08 07:18 PM
SUMPRODUCT problem אלי Excel Worksheet Functions 5 June 28th 07 04:04 PM
SUMPRODUCT #VALUE! problem Vibeke Excel Worksheet Functions 4 March 18th 07 04:46 AM
Problem with SumProduct dinadvani via OfficeKB.com Excel Discussion (Misc queries) 5 July 31st 06 01:55 PM
SUMPRODUCT problem Jane Excel Worksheet Functions 3 November 8th 04 11:58 PM


All times are GMT +1. The time now is 08:51 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"