Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default DSUM - SUMIF - or something else?

OK - Here's the problem.

I have two worksheets named Totals and Data.

In Data there are three columns, as follows:

A:A B:B C:C
Date Desig Amount

The Date column is formatted for DATE (d-mmm-yyyy); the Desig column is
General formatted with a drop-down list to pick from (Water, Sewage, etc.);
the Amount column is formatted for currency.


In the Totals worksheet, C3:N3 contain dates (m/d/yyyy), B6:B17 contains
the row names corresponding to the names in the Data!B:B (Desig) drop-down
lists, and the range C6:N17 will contain the formula I seek.
I'll just work with cell C3 for now.

Let's start off stating that B6 = "Water" and C3 = 10/1/2007

Here is the logic of what I want to do:

IF the MONTH in Data!A:A = the MONTH in C3,
AND the YEAR in Data!A:A = the YEAR in C3,
AND the text in Data!B:B = the text in B6 (Water)
then
SUM the amounts in Data!C:C


Basically, I only want to sum the numbers if the month, year, and designator
match. I thought that this would be easy but it's kicking my but!

FRUSTRATED
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default DSUM - SUMIF - or something else?

=SUMPRODUCT(--(MONTH(A2:A100)=MONTH(C3)),--(YEAR(A2:A100)=YEAR(C3)),--(B2:B100=B6),C2:C100)


"MAPepin" wrote:

OK - Here's the problem.

I have two worksheets named Totals and Data.

In Data there are three columns, as follows:

A:A B:B C:C
Date Desig Amount

The Date column is formatted for DATE (d-mmm-yyyy); the Desig column is
General formatted with a drop-down list to pick from (Water, Sewage, etc.);
the Amount column is formatted for currency.


In the Totals worksheet, C3:N3 contain dates (m/d/yyyy), B6:B17 contains
the row names corresponding to the names in the Data!B:B (Desig) drop-down
lists, and the range C6:N17 will contain the formula I seek.
I'll just work with cell C3 for now.

Let's start off stating that B6 = "Water" and C3 = 10/1/2007

Here is the logic of what I want to do:

IF the MONTH in Data!A:A = the MONTH in C3,
AND the YEAR in Data!A:A = the YEAR in C3,
AND the text in Data!B:B = the text in B6 (Water)
then
SUM the amounts in Data!C:C


Basically, I only want to sum the numbers if the month, year, and designator
match. I thought that this would be easy but it's kicking my but!

FRUSTRATED

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 834
Default DSUM - SUMIF - or something else?

I would have suggested DSUM, but the layout of the Totals sheet works
against it.

Try

=SUMPRODUCT(--(Data!$A$2:$A$200-DAY(Data!$A$2:$A$200)=C$3-DAY(C$3)),--(Data!$B$2:$B$200=$B6),Data!$C$2:$C$200)

and copy across and down.


HTH

Bob

"MAPepin" wrote in message
...
OK - Here's the problem.

I have two worksheets named Totals and Data.

In Data there are three columns, as follows:

A:A B:B C:C
Date Desig Amount

The Date column is formatted for DATE (d-mmm-yyyy); the Desig column is
General formatted with a drop-down list to pick from (Water, Sewage,
etc.);
the Amount column is formatted for currency.


In the Totals worksheet, C3:N3 contain dates (m/d/yyyy), B6:B17 contains
the row names corresponding to the names in the Data!B:B (Desig) drop-down
lists, and the range C6:N17 will contain the formula I seek.
I'll just work with cell C3 for now.

Let's start off stating that B6 = "Water" and C3 = 10/1/2007

Here is the logic of what I want to do:

IF the MONTH in Data!A:A = the MONTH in C3,
AND the YEAR in Data!A:A = the YEAR in C3,
AND the text in Data!B:B = the text in B6 (Water)
then
SUM the amounts in Data!C:C


Basically, I only want to sum the numbers if the month, year, and
designator
match. I thought that this would be easy but it's kicking my but!

FRUSTRATED



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default DSUM - SUMIF - or something else?

Thank you very much. This is just what I was looking for.

"Bob Phillips" wrote:

I would have suggested DSUM, but the layout of the Totals sheet works
against it.

Try

=SUMPRODUCT(--(Data!$A$2:$A$200-DAY(Data!$A$2:$A$200)=C$3-DAY(C$3)),--(Data!$B$2:$B$200=$B6),Data!$C$2:$C$200)

and copy across and down.


HTH

Bob

"MAPepin" wrote in message
...
OK - Here's the problem.

I have two worksheets named Totals and Data.

In Data there are three columns, as follows:

A:A B:B C:C
Date Desig Amount

The Date column is formatted for DATE (d-mmm-yyyy); the Desig column is
General formatted with a drop-down list to pick from (Water, Sewage,
etc.);
the Amount column is formatted for currency.


In the Totals worksheet, C3:N3 contain dates (m/d/yyyy), B6:B17 contains
the row names corresponding to the names in the Data!B:B (Desig) drop-down
lists, and the range C6:N17 will contain the formula I seek.
I'll just work with cell C3 for now.

Let's start off stating that B6 = "Water" and C3 = 10/1/2007

Here is the logic of what I want to do:

IF the MONTH in Data!A:A = the MONTH in C3,
AND the YEAR in Data!A:A = the YEAR in C3,
AND the text in Data!B:B = the text in B6 (Water)
then
SUM the amounts in Data!C:C


Basically, I only want to sum the numbers if the month, year, and
designator
match. I thought that this would be easy but it's kicking my but!

FRUSTRATED



.

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
dsum or sumif? ff Excel Worksheet Functions 2 January 29th 09 09:29 AM
Dsum or SumIf [email protected] Excel Worksheet Functions 4 November 18th 06 12:28 AM
Dsum or Sumif Help!!! Hervinder Excel Worksheet Functions 3 August 17th 06 04:17 PM
I've tried DSUM, SUMIF.... Jeff Excel Discussion (Misc queries) 2 September 26th 05 09:53 AM
DSUM vs SUMIF Martin Excel Worksheet Functions 7 March 2nd 05 02:55 PM


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