Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
SleazyBreezy
 
Posts: n/a
Default Sum of named ranges conditional to date?

Hi all,

Say I have a spreadsheet listed as follows:

A1 = 03/31/05
A2 = $5.00

B1 = 03/31/05
B2 = $10.00

C1 = 04/01/05
C2 = $20.00

The entire A column is named "Base_Date" and the entire B column is named
"Base_Amount".

I would like a formula that will sum values in the Amount column that
correspond with a specific date range, ie. March only. This formula must
reside in a different worksheet (within the same workbook).

I've tried the following:

=SUM(IF(Base_Date=DATEVALUE("03/01/2005"),IF(Base_Date<=DATEVALUE("03/31/2005"),Base_Amount,0),0))

If I place the formula in a seperate worksheet from the data (as intended),
its value is $35.00 (adds all values in column B) when I'm expecting it to be
only $15.00.

If I place the formula in the same worksheet as the data (not in columns A
or B), its value is reported as 0.

I'm sure I'm missing something miniscule here. Any suggestions?

TIA,
Sleazy
  #2   Report Post  
Aladin Akyurek
 
Posts: n/a
Default

=SUMIF(Base_Date,"="&X2,Base_Amount)-SUMIF(Base_Date,""&Y2,Base_Amount)

where X2 houses the first day date of the month/year of interset like:
03/01/2005 and Y2 one of:

03/31/2005

=DATE(YEAR(X2),MONTH(X2)+1,0)

SleazyBreezy wrote:
Hi all,

Say I have a spreadsheet listed as follows:

A1 = 03/31/05
A2 = $5.00

B1 = 03/31/05
B2 = $10.00

C1 = 04/01/05
C2 = $20.00

The entire A column is named "Base_Date" and the entire B column is named
"Base_Amount".

I would like a formula that will sum values in the Amount column that
correspond with a specific date range, ie. March only. This formula must
reside in a different worksheet (within the same workbook).

I've tried the following:

=SUM(IF(Base_Date=DATEVALUE("03/01/2005"),IF(Base_Date<=DATEVALUE("03/31/2005"),Base_Amount,0),0))

If I place the formula in a seperate worksheet from the data (as intended),
its value is $35.00 (adds all values in column B) when I'm expecting it to be
only $15.00.

If I place the formula in the same worksheet as the data (not in columns A
or B), its value is reported as 0.

I'm sure I'm missing something miniscule here. Any suggestions?

TIA,
Sleazy

  #3   Report Post  
SleazyBreezy
 
Posts: n/a
Default

Thank you very much! Thankfully, my date criteria is static, so the X2/Y2
variables are not needed. I used your formula to achieve the desired result
by moving the closing quotes as follows:

=SUMIF(Base_Date,"=03/01/2005",Base_Amount)-SUMIF(Base_Date,"03/31/2005",Base_Amount)


"Aladin Akyurek" wrote:

=SUMIF(Base_Date,"="&X2,Base_Amount)-SUMIF(Base_Date,""&Y2,Base_Amount)

where X2 houses the first day date of the month/year of interset like:
03/01/2005 and Y2 one of:

03/31/2005

=DATE(YEAR(X2),MONTH(X2)+1,0)

  #4   Report Post  
SleazyBreezy
 
Posts: n/a
Default

Okay, now I have a second, similar problem. Here's my new table:

A1: 03/01/2005
B1: $5.00
A2: 03/05/2005
B2: $12.00
A3: 04/05/2005
B3: $3.00
A4: 03/05/2005
B4: $50.00

As before, the A column is named Base_Date and the B column is named
Base_Amount. I want to modify the SUMIF formula, as used below, so that it
adds only the records associated with the *latest* date in a specified date
range. Referencing the table above, if I specify 03/01/2005 and
<=03/31/2005, the formula should add B2+B4, and not include B1. However, if I
then add the following to the table:

A5: 03/29/2005
B5: $1.00

The formula should only report back B5 for its value, as A5 is the latest
date in the allowed range.

Thanks again in advance.

:-)

- Sleazy

"SleazyBreezy" wrote:

Thank you very much! Thankfully, my date criteria is static, so the X2/Y2
variables are not needed. I used your formula to achieve the desired result
by moving the closing quotes as follows:

=SUMIF(Base_Date,"=03/01/2005",Base_Amount)-SUMIF(Base_Date,"03/31/2005",Base_Amount)

  #5   Report Post  
Aladin Akyurek
 
Posts: n/a
Default

D2: 3/1/05
E2: 3/31/05
F2:

=MAX(IF(($A$1:$A$4=D2)*($A$1:$A$4<=E2),$A$1:$A$4) )

which must be confirmed with control+shift+enter instead of just with enter.

G2:

=SUMIF($A$1:$A$4,F2,$B$1:$B$4)

SleazyBreezy wrote:
Okay, now I have a second, similar problem. Here's my new table:

A1: 03/01/2005
B1: $5.00
A2: 03/05/2005
B2: $12.00
A3: 04/05/2005
B3: $3.00
A4: 03/05/2005
B4: $50.00

As before, the A column is named Base_Date and the B column is named
Base_Amount. I want to modify the SUMIF formula, as used below, so that it
adds only the records associated with the *latest* date in a specified date
range. Referencing the table above, if I specify 03/01/2005 and
<=03/31/2005, the formula should add B2+B4, and not include B1. However, if I
then add the following to the table:

A5: 03/29/2005
B5: $1.00

The formula should only report back B5 for its value, as A5 is the latest
date in the allowed range.

Thanks again in advance.

:-)

- Sleazy

"SleazyBreezy" wrote:


Thank you very much! Thankfully, my date criteria is static, so the X2/Y2
variables are not needed. I used your formula to achieve the desired result
by moving the closing quotes as follows:

=SUMIF(Base_Date,"=03/01/2005",Base_Amount)-SUMIF(Base_Date,"03/31/2005",Base_Amount)



  #6   Report Post  
SleazyBreezy
 
Posts: n/a
Default

This really works well. Thanks so much!

It's humbling to know that I just can't grasp the concept of array formulas
at this point of my Excel training. Back to the books!

- Sleazy

"Aladin Akyurek" wrote:

D2: 3/1/05
E2: 3/31/05
F2:

=MAX(IF(($A$1:$A$4=D2)*($A$1:$A$4<=E2),$A$1:$A$4) )

which must be confirmed with control+shift+enter instead of just with enter.

G2:

=SUMIF($A$1:$A$4,F2,$B$1:$B$4)

SleazyBreezy wrote:
Okay, now I have a second, similar problem. Here's my new table:

A1: 03/01/2005
B1: $5.00
A2: 03/05/2005
B2: $12.00
A3: 04/05/2005
B3: $3.00
A4: 03/05/2005
B4: $50.00

As before, the A column is named Base_Date and the B column is named
Base_Amount. I want to modify the SUMIF formula, as used below, so that it
adds only the records associated with the *latest* date in a specified date
range. Referencing the table above, if I specify 03/01/2005 and
<=03/31/2005, the formula should add B2+B4, and not include B1. However, if I
then add the following to the table:

A5: 03/29/2005
B5: $1.00

The formula should only report back B5 for its value, as A5 is the latest
date in the allowed range.

Thanks again in advance.

:-)

- Sleazy

"SleazyBreezy" wrote:


Thank you very much! Thankfully, my date criteria is static, so the X2/Y2
variables are not needed. I used your formula to achieve the desired result
by moving the closing quotes as follows:

=SUMIF(Base_Date,"=03/01/2005",Base_Amount)-SUMIF(Base_Date,"03/31/2005",Base_Amount)


  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Sum of named ranges conditional to date?

I tried this formula and I can not seem to make it work. Is the MAX IF
formula supposed to generate a zero as a result?



"Aladin Akyurek" wrote:

D2: 3/1/05
E2: 3/31/05
F2:

=MAX(IF(($A$1:$A$4=D2)*($A$1:$A$4<=E2),$A$1:$A$4) )

which must be confirmed with control+shift+enter instead of just with enter.

G2:

=SUMIF($A$1:$A$4,F2,$B$1:$B$4)

SleazyBreezy wrote:
Okay, now I have a second, similar problem. Here's my new table:

A1: 03/01/2005
B1: $5.00
A2: 03/05/2005
B2: $12.00
A3: 04/05/2005
B3: $3.00
A4: 03/05/2005
B4: $50.00

As before, the A column is named Base_Date and the B column is named
Base_Amount. I want to modify the SUMIF formula, as used below, so that it
adds only the records associated with the *latest* date in a specified date
range. Referencing the table above, if I specify 03/01/2005 and
<=03/31/2005, the formula should add B2+B4, and not include B1. However, if I
then add the following to the table:

A5: 03/29/2005
B5: $1.00

The formula should only report back B5 for its value, as A5 is the latest
date in the allowed range.

Thanks again in advance.

:-)

- Sleazy

"SleazyBreezy" wrote:


Thank you very much! Thankfully, my date criteria is static, so the X2/Y2
variables are not needed. I used your formula to achieve the desired result
by moving the closing quotes as follows:

=SUMIF(Base_Date,"=03/01/2005",Base_Amount)-SUMIF(Base_Date,"03/31/2005",Base_Amount)


  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Sum of named ranges conditional to date?

Did you enter the formula using Control+Shift+Enter or just the Enter key by
itself? The formula requires the 3-key combination to work correctly.

Rick


"nukegirl" wrote in message
...
I tried this formula and I can not seem to make it work. Is the MAX IF
formula supposed to generate a zero as a result?



"Aladin Akyurek" wrote:

D2: 3/1/05
E2: 3/31/05
F2:

=MAX(IF(($A$1:$A$4=D2)*($A$1:$A$4<=E2),$A$1:$A$4) )

which must be confirmed with control+shift+enter instead of just with
enter.

G2:

=SUMIF($A$1:$A$4,F2,$B$1:$B$4)

SleazyBreezy wrote:
Okay, now I have a second, similar problem. Here's my new table:

A1: 03/01/2005
B1: $5.00
A2: 03/05/2005
B2: $12.00
A3: 04/05/2005
B3: $3.00
A4: 03/05/2005
B4: $50.00

As before, the A column is named Base_Date and the B column is named
Base_Amount. I want to modify the SUMIF formula, as used below, so that
it
adds only the records associated with the *latest* date in a specified
date
range. Referencing the table above, if I specify 03/01/2005 and
<=03/31/2005, the formula should add B2+B4, and not include B1.
However, if I
then add the following to the table:

A5: 03/29/2005
B5: $1.00

The formula should only report back B5 for its value, as A5 is the
latest
date in the allowed range.

Thanks again in advance.

:-)

- Sleazy

"SleazyBreezy" wrote:


Thank you very much! Thankfully, my date criteria is static, so the
X2/Y2
variables are not needed. I used your formula to achieve the desired
result
by moving the closing quotes as follows:

=SUMIF(Base_Date,"=03/01/2005",Base_Amount)-SUMIF(Base_Date,"03/31/2005",Base_Amount)



  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Sum of named ranges conditional to date?

Thanks Rick! Got it to work. Appreciate the response.

"Rick Rothstein (MVP - VB)" wrote:

Did you enter the formula using Control+Shift+Enter or just the Enter key by
itself? The formula requires the 3-key combination to work correctly.

Rick


"nukegirl" wrote in message
...
I tried this formula and I can not seem to make it work. Is the MAX IF
formula supposed to generate a zero as a result?



"Aladin Akyurek" wrote:

D2: 3/1/05
E2: 3/31/05
F2:

=MAX(IF(($A$1:$A$4=D2)*($A$1:$A$4<=E2),$A$1:$A$4) )

which must be confirmed with control+shift+enter instead of just with
enter.

G2:

=SUMIF($A$1:$A$4,F2,$B$1:$B$4)

SleazyBreezy wrote:
Okay, now I have a second, similar problem. Here's my new table:

A1: 03/01/2005
B1: $5.00
A2: 03/05/2005
B2: $12.00
A3: 04/05/2005
B3: $3.00
A4: 03/05/2005
B4: $50.00

As before, the A column is named Base_Date and the B column is named
Base_Amount. I want to modify the SUMIF formula, as used below, so that
it
adds only the records associated with the *latest* date in a specified
date
range. Referencing the table above, if I specify 03/01/2005 and
<=03/31/2005, the formula should add B2+B4, and not include B1.
However, if I
then add the following to the table:

A5: 03/29/2005
B5: $1.00

The formula should only report back B5 for its value, as A5 is the
latest
date in the allowed range.

Thanks again in advance.

:-)

- Sleazy

"SleazyBreezy" wrote:


Thank you very much! Thankfully, my date criteria is static, so the
X2/Y2
variables are not needed. I used your formula to achieve the desired
result
by moving the closing quotes as follows:

=SUMIF(Base_Date,"=03/01/2005",Base_Amount)-SUMIF(Base_Date,"03/31/2005",Base_Amount)



  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Sum of named ranges conditional to date?

Hi

I have a table where there are multiple entries for the same month and I
want to produce monthly totals. I used the formula above (the MAX IF is
working great) but the SUM IF is only returning one of the amounts per month
rather than adding the different entries. Can anyone help?

Thank you in advance!

"Rick Rothstein (MVP - VB)" wrote:

Did you enter the formula using Control+Shift+Enter or just the Enter key by
itself? The formula requires the 3-key combination to work correctly.

Rick


"nukegirl" wrote in message
...
I tried this formula and I can not seem to make it work. Is the MAX IF
formula supposed to generate a zero as a result?



"Aladin Akyurek" wrote:

D2: 3/1/05
E2: 3/31/05
F2:

=MAX(IF(($A$1:$A$4=D2)*($A$1:$A$4<=E2),$A$1:$A$4) )

which must be confirmed with control+shift+enter instead of just with
enter.

G2:

=SUMIF($A$1:$A$4,F2,$B$1:$B$4)

SleazyBreezy wrote:
Okay, now I have a second, similar problem. Here's my new table:

A1: 03/01/2005
B1: $5.00
A2: 03/05/2005
B2: $12.00
A3: 04/05/2005
B3: $3.00
A4: 03/05/2005
B4: $50.00

As before, the A column is named Base_Date and the B column is named
Base_Amount. I want to modify the SUMIF formula, as used below, so that
it
adds only the records associated with the *latest* date in a specified
date
range. Referencing the table above, if I specify 03/01/2005 and
<=03/31/2005, the formula should add B2+B4, and not include B1.
However, if I
then add the following to the table:

A5: 03/29/2005
B5: $1.00

The formula should only report back B5 for its value, as A5 is the
latest
date in the allowed range.

Thanks again in advance.

:-)

- Sleazy

"SleazyBreezy" wrote:


Thank you very much! Thankfully, my date criteria is static, so the
X2/Y2
variables are not needed. I used your formula to achieve the desired
result
by moving the closing quotes as follows:

=SUMIF(Base_Date,"=03/01/2005",Base_Amount)-SUMIF(Base_Date,"03/31/2005",Base_Amount)





  #11   Report Post  
Posted to microsoft.public.excel.worksheet.functions
gus gus is offline
external usenet poster
 
Posts: 10
Default Sum of named ranges conditional to date?

Hi,

I have a similar situation, but with data in rows.
Here is the formula which does not work for me (why?) but when I change
today's date to a number it works.

=SUMIF($AA$3:$CU$3,<$X$1,$AA4:$CU4)

top row AA3 - CU3 contains months.
below row AA4 - CU4 contains values
my objective is to sum all of the values for past months ( in comparison to
current month, which is located in the cell X1)

Thanks, Gus




"SleazyBreezy" wrote:

Hi all,

Say I have a spreadsheet listed as follows:

A1 = 03/31/05
A2 = $5.00

B1 = 03/31/05
B2 = $10.00

C1 = 04/01/05
C2 = $20.00

The entire A column is named "Base_Date" and the entire B column is named
"Base_Amount".

I would like a formula that will sum values in the Amount column that
correspond with a specific date range, ie. March only. This formula must
reside in a different worksheet (within the same workbook).

I've tried the following:

=SUM(IF(Base_Date=DATEVALUE("03/01/2005"),IF(Base_Date<=DATEVALUE("03/31/2005"),Base_Amount,0),0))

If I place the formula in a seperate worksheet from the data (as intended),
its value is $35.00 (adds all values in column B) when I'm expecting it to be
only $15.00.

If I place the formula in the same worksheet as the data (not in columns A
or B), its value is reported as 0.

I'm sure I'm missing something miniscule here. Any suggestions?

TIA,
Sleazy

  #12   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Sum of named ranges conditional to date?

top row AA3 - CU3 contains months.

In what form? Are they the month names as *TEXT* entrires: Jan, Feb, Mar?

Are they *DATES* formatted to display the month name?

when I change today's date to a number it works.


How are you changing today's date to a number? What number?

Maybe you want something like this:

=SUMPRODUCT(--(MONTH($AA$3:$CU$3)<MONTH($X$1)),$AA4:$CU4)


--
Biff
Microsoft Excel MVP


"Gus" wrote in message
...
Hi,

I have a similar situation, but with data in rows.
Here is the formula which does not work for me (why?) but when I change
today's date to a number it works.

=SUMIF($AA$3:$CU$3,<$X$1,$AA4:$CU4)

top row AA3 - CU3 contains months.
below row AA4 - CU4 contains values
my objective is to sum all of the values for past months ( in comparison
to
current month, which is located in the cell X1)

Thanks, Gus




"SleazyBreezy" wrote:

Hi all,

Say I have a spreadsheet listed as follows:

A1 = 03/31/05
A2 = $5.00

B1 = 03/31/05
B2 = $10.00

C1 = 04/01/05
C2 = $20.00

The entire A column is named "Base_Date" and the entire B column is named
"Base_Amount".

I would like a formula that will sum values in the Amount column that
correspond with a specific date range, ie. March only. This formula must
reside in a different worksheet (within the same workbook).

I've tried the following:

=SUM(IF(Base_Date=DATEVALUE("03/01/2005"),IF(Base_Date<=DATEVALUE("03/31/2005"),Base_Amount,0),0))

If I place the formula in a seperate worksheet from the data (as
intended),
its value is $35.00 (adds all values in column B) when I'm expecting it
to be
only $15.00.

If I place the formula in the same worksheet as the data (not in columns
A
or B), its value is reported as 0.

I'm sure I'm missing something miniscule here. Any suggestions?

TIA,
Sleazy



  #13   Report Post  
Posted to microsoft.public.excel.worksheet.functions
gus gus is offline
external usenet poster
 
Posts: 10
Default Sum of named ranges conditional to date?

The top raw is in the date format ( 1/1/2008 to display Jan-08).
If the date in cell X1 is formated same way as above, the formula does not
work, why?.
Once I change it to <=39814 then the formula works.

Gus





"T. Valko" wrote:

top row AA3 - CU3 contains months.


In what form? Are they the month names as *TEXT* entrires: Jan, Feb, Mar?

Are they *DATES* formatted to display the month name?

when I change today's date to a number it works.


How are you changing today's date to a number? What number?

Maybe you want something like this:

=SUMPRODUCT(--(MONTH($AA$3:$CU$3)<MONTH($X$1)),$AA4:$CU4)


--
Biff
Microsoft Excel MVP


"Gus" wrote in message
...
Hi,

I have a similar situation, but with data in rows.
Here is the formula which does not work for me (why?) but when I change
today's date to a number it works.

=SUMIF($AA$3:$CU$3,<$X$1,$AA4:$CU4)

top row AA3 - CU3 contains months.
below row AA4 - CU4 contains values
my objective is to sum all of the values for past months ( in comparison
to
current month, which is located in the cell X1)

Thanks, Gus




"SleazyBreezy" wrote:

Hi all,

Say I have a spreadsheet listed as follows:

A1 = 03/31/05
A2 = $5.00

B1 = 03/31/05
B2 = $10.00

C1 = 04/01/05
C2 = $20.00

The entire A column is named "Base_Date" and the entire B column is named
"Base_Amount".

I would like a formula that will sum values in the Amount column that
correspond with a specific date range, ie. March only. This formula must
reside in a different worksheet (within the same workbook).

I've tried the following:

=SUM(IF(Base_Date=DATEVALUE("03/01/2005"),IF(Base_Date<=DATEVALUE("03/31/2005"),Base_Amount,0),0))

If I place the formula in a seperate worksheet from the data (as
intended),
its value is $35.00 (adds all values in column B) when I'm expecting it
to be
only $15.00.

If I place the formula in the same worksheet as the data (not in columns
A
or B), its value is reported as 0.

I'm sure I'm missing something miniscule here. Any suggestions?

TIA,
Sleazy




  #14   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Sum of named ranges conditional to date?

If the date in cell X1 is formated same way as above,
the formula does not work, why?.


It should. Try it like this:

=SUMIF($AA$3:$CU$3,"<="&$X$1,$AA4:$CU4)

--
Biff
Microsoft Excel MVP


"Gus" wrote in message
...
The top raw is in the date format ( 1/1/2008 to display Jan-08).
If the date in cell X1 is formated same way as above, the formula does not
work, why?.
Once I change it to <=39814 then the formula works.

Gus





"T. Valko" wrote:

top row AA3 - CU3 contains months.


In what form? Are they the month names as *TEXT* entrires: Jan, Feb, Mar?

Are they *DATES* formatted to display the month name?

when I change today's date to a number it works.


How are you changing today's date to a number? What number?

Maybe you want something like this:

=SUMPRODUCT(--(MONTH($AA$3:$CU$3)<MONTH($X$1)),$AA4:$CU4)


--
Biff
Microsoft Excel MVP


"Gus" wrote in message
...
Hi,

I have a similar situation, but with data in rows.
Here is the formula which does not work for me (why?) but when I change
today's date to a number it works.

=SUMIF($AA$3:$CU$3,<$X$1,$AA4:$CU4)

top row AA3 - CU3 contains months.
below row AA4 - CU4 contains values
my objective is to sum all of the values for past months ( in
comparison
to
current month, which is located in the cell X1)

Thanks, Gus




"SleazyBreezy" wrote:

Hi all,

Say I have a spreadsheet listed as follows:

A1 = 03/31/05
A2 = $5.00

B1 = 03/31/05
B2 = $10.00

C1 = 04/01/05
C2 = $20.00

The entire A column is named "Base_Date" and the entire B column is
named
"Base_Amount".

I would like a formula that will sum values in the Amount column that
correspond with a specific date range, ie. March only. This formula
must
reside in a different worksheet (within the same workbook).

I've tried the following:

=SUM(IF(Base_Date=DATEVALUE("03/01/2005"),IF(Base_Date<=DATEVALUE("03/31/2005"),Base_Amount,0),0))

If I place the formula in a seperate worksheet from the data (as
intended),
its value is $35.00 (adds all values in column B) when I'm expecting
it
to be
only $15.00.

If I place the formula in the same worksheet as the data (not in
columns
A
or B), its value is reported as 0.

I'm sure I'm missing something miniscule here. Any suggestions?

TIA,
Sleazy






  #15   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22
Default Sum of named ranges conditional to date?

The SUMIF function can work with one criteria given. How can I modify a
formula by adding other functions to make the SUMIF work with TWO criterion
met?

Thanks



"SleazyBreezy" wrote:

Thank you very much! Thankfully, my date criteria is static, so the X2/Y2
variables are not needed. I used your formula to achieve the desired result
by moving the closing quotes as follows:

=SUMIF(Base_Date,"=03/01/2005",Base_Amount)-SUMIF(Base_Date,"03/31/2005",Base_Amount)


"Aladin Akyurek" wrote:

=SUMIF(Base_Date,"="&X2,Base_Amount)-SUMIF(Base_Date,""&Y2,Base_Amount)

where X2 houses the first day date of the month/year of interset like:
03/01/2005 and Y2 one of:

03/31/2005

=DATE(YEAR(X2),MONTH(X2)+1,0)



  #16   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,480
Default Sum of named ranges conditional to date?

Hi

Up until XL2003, Sumif takes a single Criterion.
With XL2007, SUMIFS allows multiple criteria.

If you are using 2003 or lower, consider the use of Sumproduct.

=SUMPRODUCT((Range1=X1)*(Range2=Y1)*(Range3=Z1)*Ra nge4)
Where Range 4 is the values to be Summed, the other Ranges are what you are
wanting to match against certain values held in cells X1, Y1 and Z1.
Ensure the Ranges are of equal size, and in 2003 and lower, ranges cannot be
whole columns.

--
Regards
Roger Govier

"tywlam" wrote in message
...
The SUMIF function can work with one criteria given. How can I modify a
formula by adding other functions to make the SUMIF work with TWO
criterion
met?

Thanks



"SleazyBreezy" wrote:

Thank you very much! Thankfully, my date criteria is static, so the X2/Y2
variables are not needed. I used your formula to achieve the desired
result
by moving the closing quotes as follows:

=SUMIF(Base_Date,"=03/01/2005",Base_Amount)-SUMIF(Base_Date,"03/31/2005",Base_Amount)


"Aladin Akyurek" wrote:

=SUMIF(Base_Date,"="&X2,Base_Amount)-SUMIF(Base_Date,""&Y2,Base_Amount)

where X2 houses the first day date of the month/year of interset like:
03/01/2005 and Y2 one of:

03/31/2005

=DATE(YEAR(X2),MONTH(X2)+1,0)

  #17   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22
Default Sum of named ranges conditional to date?

Thanks Roger. But it just couldn't work! Let me take an example below:

Col.A Col.B Col.C
Row1 Project Date Amount
Row2 AAA 01/03/2008 200
Row3 BBB 01/03/2008 100
Row4 AAA 15/03/2008 20
Row5 CCC 02/03/3008 10
Row6 DDD 01/04/2008 200
Row7 CCC 27/03/2008 130
Row8 AAA 05/04/2008 30

I'd like to sum the values in Col.C with project name of AAA in Col.A and
date of March 2008 in Col.B. I write the the formula:
=SUMPRODUCT((A1:A8="AAA")*(B1:B8="**/03/****")*(C1:C8)) but it gives the
result of zero! The correct answer should be 220. (200+20)

Please help!

Regards,
Terry


"Roger Govier" wrote:

Hi

Up until XL2003, Sumif takes a single Criterion.
With XL2007, SUMIFS allows multiple criteria.

If you are using 2003 or lower, consider the use of Sumproduct.

=SUMPRODUCT((Range1=X1)*(Range2=Y1)*(Range3=Z1)*Ra nge4)
Where Range 4 is the values to be Summed, the other Ranges are what you are
wanting to match against certain values held in cells X1, Y1 and Z1.
Ensure the Ranges are of equal size, and in 2003 and lower, ranges cannot be
whole columns.

--
Regards
Roger Govier

"tywlam" wrote in message
...
The SUMIF function can work with one criteria given. How can I modify a
formula by adding other functions to make the SUMIF work with TWO
criterion
met?

Thanks



"SleazyBreezy" wrote:

Thank you very much! Thankfully, my date criteria is static, so the X2/Y2
variables are not needed. I used your formula to achieve the desired
result
by moving the closing quotes as follows:

=SUMIF(Base_Date,"=03/01/2005",Base_Amount)-SUMIF(Base_Date,"03/31/2005",Base_Amount)


"Aladin Akyurek" wrote:

=SUMIF(Base_Date,"="&X2,Base_Amount)-SUMIF(Base_Date,""&Y2,Base_Amount)

where X2 houses the first day date of the month/year of interset like:
03/01/2005 and Y2 one of:

03/31/2005

=DATE(YEAR(X2),MONTH(X2)+1,0)

  #18   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,480
Default Sum of named ranges conditional to date?

Hi

It will work, if you need to change the formula slightly.
dates are stored as serial numbers, hence they will never be "seen" as **
/03/ ****.
You need to compare the Text(date,"mmyyyy") to get your result.

=SUMPRODUCT((A1:A8="AAA")*(TEXT(B1:B8,"mmyyyy")="0 32008")*C1:C8)

You don't need parentheses around the C values, as they are your data and
are not being used in any comparison.
Including them, will nit prevent the formula working - they are just not
necessary.

--
Regards
Roger Govier

"tywlam" wrote in message
...
Thanks Roger. But it just couldn't work! Let me take an example below:

Col.A Col.B Col.C
Row1 Project Date Amount
Row2 AAA 01/03/2008 200
Row3 BBB 01/03/2008 100
Row4 AAA 15/03/2008 20
Row5 CCC 02/03/3008 10
Row6 DDD 01/04/2008 200
Row7 CCC 27/03/2008 130
Row8 AAA 05/04/2008 30

I'd like to sum the values in Col.C with project name of AAA in Col.A and
date of March 2008 in Col.B. I write the the formula:
=SUMPRODUCT((A1:A8="AAA")*(B1:B8="**/03/****")*(C1:C8)) but it gives the
result of zero! The correct answer should be 220. (200+20)

Please help!

Regards,
Terry


"Roger Govier" wrote:

Hi

Up until XL2003, Sumif takes a single Criterion.
With XL2007, SUMIFS allows multiple criteria.

If you are using 2003 or lower, consider the use of Sumproduct.

=SUMPRODUCT((Range1=X1)*(Range2=Y1)*(Range3=Z1)*Ra nge4)
Where Range 4 is the values to be Summed, the other Ranges are what you
are
wanting to match against certain values held in cells X1, Y1 and Z1.
Ensure the Ranges are of equal size, and in 2003 and lower, ranges cannot
be
whole columns.

--
Regards
Roger Govier

"tywlam" wrote in message
...
The SUMIF function can work with one criteria given. How can I modify
a
formula by adding other functions to make the SUMIF work with TWO
criterion
met?

Thanks



"SleazyBreezy" wrote:

Thank you very much! Thankfully, my date criteria is static, so the
X2/Y2
variables are not needed. I used your formula to achieve the desired
result
by moving the closing quotes as follows:

=SUMIF(Base_Date,"=03/01/2005",Base_Amount)-SUMIF(Base_Date,"03/31/2005",Base_Amount)


"Aladin Akyurek" wrote:

=SUMIF(Base_Date,"="&X2,Base_Amount)-SUMIF(Base_Date,""&Y2,Base_Amount)

where X2 houses the first day date of the month/year of interset
like:
03/01/2005 and Y2 one of:

03/31/2005

=DATE(YEAR(X2),MONTH(X2)+1,0)

  #19   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22
Default Sum of named ranges conditional to date?

It works when both criteria and formula are in the same worksheet. Thank
you. But when the formula is not in the same worksheet, it give all zero
results!! I've checked the formula carefully and also used the functions bar
dialog box to set up my formula. It still doesn't work! Do you know why?

Regards,


"Roger Govier" wrote:

Hi

It will work, if you need to change the formula slightly.
dates are stored as serial numbers, hence they will never be "seen" as **
/03/ ****.
You need to compare the Text(date,"mmyyyy") to get your result.

=SUMPRODUCT((A1:A8="AAA")*(TEXT(B1:B8,"mmyyyy")="0 32008")*C1:C8)

You don't need parentheses around the C values, as they are your data and
are not being used in any comparison.
Including them, will nit prevent the formula working - they are just not
necessary.

--
Regards
Roger Govier

"tywlam" wrote in message
...
Thanks Roger. But it just couldn't work! Let me take an example below:

Col.A Col.B Col.C
Row1 Project Date Amount
Row2 AAA 01/03/2008 200
Row3 BBB 01/03/2008 100
Row4 AAA 15/03/2008 20
Row5 CCC 02/03/3008 10
Row6 DDD 01/04/2008 200
Row7 CCC 27/03/2008 130
Row8 AAA 05/04/2008 30

I'd like to sum the values in Col.C with project name of AAA in Col.A and
date of March 2008 in Col.B. I write the the formula:
=SUMPRODUCT((A1:A8="AAA")*(B1:B8="**/03/****")*(C1:C8)) but it gives the
result of zero! The correct answer should be 220. (200+20)

Please help!

Regards,
Terry


"Roger Govier" wrote:

Hi

Up until XL2003, Sumif takes a single Criterion.
With XL2007, SUMIFS allows multiple criteria.

If you are using 2003 or lower, consider the use of Sumproduct.

=SUMPRODUCT((Range1=X1)*(Range2=Y1)*(Range3=Z1)*Ra nge4)
Where Range 4 is the values to be Summed, the other Ranges are what you
are
wanting to match against certain values held in cells X1, Y1 and Z1.
Ensure the Ranges are of equal size, and in 2003 and lower, ranges cannot
be
whole columns.

--
Regards
Roger Govier

"tywlam" wrote in message
...
The SUMIF function can work with one criteria given. How can I modify
a
formula by adding other functions to make the SUMIF work with TWO
criterion
met?

Thanks



"SleazyBreezy" wrote:

Thank you very much! Thankfully, my date criteria is static, so the
X2/Y2
variables are not needed. I used your formula to achieve the desired
result
by moving the closing quotes as follows:

=SUMIF(Base_Date,"=03/01/2005",Base_Amount)-SUMIF(Base_Date,"03/31/2005",Base_Amount)


"Aladin Akyurek" wrote:

=SUMIF(Base_Date,"="&X2,Base_Amount)-SUMIF(Base_Date,""&Y2,Base_Amount)

where X2 houses the first day date of the month/year of interset
like:
03/01/2005 and Y2 one of:

03/31/2005

=DATE(YEAR(X2),MONTH(X2)+1,0)

  #20   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22
Default Sum of named ranges conditional to date?

Another problem: If I put a Cell number that is reference to a text in
another cell in substitute of direct text "AAA" in the formula, the result
becomes zero again! How do I format the cell or change the formula?

Regards,
Terry


"Roger Govier" wrote:

Hi

It will work, if you need to change the formula slightly.
dates are stored as serial numbers, hence they will never be "seen" as **
/03/ ****.
You need to compare the Text(date,"mmyyyy") to get your result.

=SUMPRODUCT((A1:A8="AAA")*(TEXT(B1:B8,"mmyyyy")="0 32008")*C1:C8)

You don't need parentheses around the C values, as they are your data and
are not being used in any comparison.
Including them, will nit prevent the formula working - they are just not
necessary.

--
Regards
Roger Govier

"tywlam" wrote in message
...
Thanks Roger. But it just couldn't work! Let me take an example below:

Col.A Col.B Col.C
Row1 Project Date Amount
Row2 AAA 01/03/2008 200
Row3 BBB 01/03/2008 100
Row4 AAA 15/03/2008 20
Row5 CCC 02/03/3008 10
Row6 DDD 01/04/2008 200
Row7 CCC 27/03/2008 130
Row8 AAA 05/04/2008 30

I'd like to sum the values in Col.C with project name of AAA in Col.A and
date of March 2008 in Col.B. I write the the formula:
=SUMPRODUCT((A1:A8="AAA")*(B1:B8="**/03/****")*(C1:C8)) but it gives the
result of zero! The correct answer should be 220. (200+20)

Please help!

Regards,
Terry


"Roger Govier" wrote:

Hi

Up until XL2003, Sumif takes a single Criterion.
With XL2007, SUMIFS allows multiple criteria.

If you are using 2003 or lower, consider the use of Sumproduct.

=SUMPRODUCT((Range1=X1)*(Range2=Y1)*(Range3=Z1)*Ra nge4)
Where Range 4 is the values to be Summed, the other Ranges are what you
are
wanting to match against certain values held in cells X1, Y1 and Z1.
Ensure the Ranges are of equal size, and in 2003 and lower, ranges cannot
be
whole columns.

--
Regards
Roger Govier

"tywlam" wrote in message
...
The SUMIF function can work with one criteria given. How can I modify
a
formula by adding other functions to make the SUMIF work with TWO
criterion
met?

Thanks



"SleazyBreezy" wrote:

Thank you very much! Thankfully, my date criteria is static, so the
X2/Y2
variables are not needed. I used your formula to achieve the desired
result
by moving the closing quotes as follows:

=SUMIF(Base_Date,"=03/01/2005",Base_Amount)-SUMIF(Base_Date,"03/31/2005",Base_Amount)


"Aladin Akyurek" wrote:

=SUMIF(Base_Date,"="&X2,Base_Amount)-SUMIF(Base_Date,""&Y2,Base_Amount)

where X2 houses the first day date of the month/year of interset
like:
03/01/2005 and Y2 one of:

03/31/2005

=DATE(YEAR(X2),MONTH(X2)+1,0)



  #21   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,480
Default Sum of named ranges conditional to date?

Hi

Send me a copy of your data, and I will try to sort it out.

To mail direct, send to
roger at technology4u dot co dot uk
Change the at and dots to make valid email address

--
Regards
Roger Govier

"tywlam" wrote in message
...
Another problem: If I put a Cell number that is reference to a text in
another cell in substitute of direct text "AAA" in the formula, the result
becomes zero again! How do I format the cell or change the formula?

Regards,
Terry


"Roger Govier" wrote:

Hi

It will work, if you need to change the formula slightly.
dates are stored as serial numbers, hence they will never be "seen" as **
/03/ ****.
You need to compare the Text(date,"mmyyyy") to get your result.

=SUMPRODUCT((A1:A8="AAA")*(TEXT(B1:B8,"mmyyyy")="0 32008")*C1:C8)

You don't need parentheses around the C values, as they are your data and
are not being used in any comparison.
Including them, will nit prevent the formula working - they are just not
necessary.

--
Regards
Roger Govier

"tywlam" wrote in message
...
Thanks Roger. But it just couldn't work! Let me take an example below:

Col.A Col.B Col.C
Row1 Project Date Amount
Row2 AAA 01/03/2008 200
Row3 BBB 01/03/2008 100
Row4 AAA 15/03/2008 20
Row5 CCC 02/03/3008 10
Row6 DDD 01/04/2008 200
Row7 CCC 27/03/2008 130
Row8 AAA 05/04/2008 30

I'd like to sum the values in Col.C with project name of AAA in Col.A
and
date of March 2008 in Col.B. I write the the formula:
=SUMPRODUCT((A1:A8="AAA")*(B1:B8="**/03/****")*(C1:C8)) but it gives
the
result of zero! The correct answer should be 220. (200+20)

Please help!

Regards,
Terry


"Roger Govier" wrote:

Hi

Up until XL2003, Sumif takes a single Criterion.
With XL2007, SUMIFS allows multiple criteria.

If you are using 2003 or lower, consider the use of Sumproduct.

=SUMPRODUCT((Range1=X1)*(Range2=Y1)*(Range3=Z1)*Ra nge4)
Where Range 4 is the values to be Summed, the other Ranges are what
you
are
wanting to match against certain values held in cells X1, Y1 and Z1.
Ensure the Ranges are of equal size, and in 2003 and lower, ranges
cannot
be
whole columns.

--
Regards
Roger Govier

"tywlam" wrote in message
...
The SUMIF function can work with one criteria given. How can I
modify
a
formula by adding other functions to make the SUMIF work with TWO
criterion
met?

Thanks



"SleazyBreezy" wrote:

Thank you very much! Thankfully, my date criteria is static, so the
X2/Y2
variables are not needed. I used your formula to achieve the
desired
result
by moving the closing quotes as follows:

=SUMIF(Base_Date,"=03/01/2005",Base_Amount)-SUMIF(Base_Date,"03/31/2005",Base_Amount)


"Aladin Akyurek" wrote:

=SUMIF(Base_Date,"="&X2,Base_Amount)-SUMIF(Base_Date,""&Y2,Base_Amount)

where X2 houses the first day date of the month/year of interset
like:
03/01/2005 and Y2 one of:

03/31/2005

=DATE(YEAR(X2),MONTH(X2)+1,0)

  #22   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Nat Nat is offline
external usenet poster
 
Posts: 47
Default Sum of named ranges conditional to date?

I think my request is simpler than all I've seen here and yet I can't get it
to work (it always gives me an anser of 0). In column A I have dates in
mm/dd/yyyy format, in column B I have amounts. I only want to sum the
amounts in column B if they correspond to a date which is less than or equal
today's date. Here's what I came up with (which doesn't work):
=SUMIF(A2:A28, "<="&TODAY(), B2:B28)

Can anyone tell me what I'm doing wrong?

"T. Valko" wrote:

If the date in cell X1 is formated same way as above,
the formula does not work, why?.


It should. Try it like this:

=SUMIF($AA$3:$CU$3,"<="&$X$1,$AA4:$CU4)

--
Biff
Microsoft Excel MVP


"Gus" wrote in message
...
The top raw is in the date format ( 1/1/2008 to display Jan-08).
If the date in cell X1 is formated same way as above, the formula does not
work, why?.
Once I change it to <=39814 then the formula works.

Gus





"T. Valko" wrote:

top row AA3 - CU3 contains months.

In what form? Are they the month names as *TEXT* entrires: Jan, Feb, Mar?

Are they *DATES* formatted to display the month name?

when I change today's date to a number it works.

How are you changing today's date to a number? What number?

Maybe you want something like this:

=SUMPRODUCT(--(MONTH($AA$3:$CU$3)<MONTH($X$1)),$AA4:$CU4)


--
Biff
Microsoft Excel MVP


"Gus" wrote in message
...
Hi,

I have a similar situation, but with data in rows.
Here is the formula which does not work for me (why?) but when I change
today's date to a number it works.

=SUMIF($AA$3:$CU$3,<$X$1,$AA4:$CU4)

top row AA3 - CU3 contains months.
below row AA4 - CU4 contains values
my objective is to sum all of the values for past months ( in
comparison
to
current month, which is located in the cell X1)

Thanks, Gus




"SleazyBreezy" wrote:

Hi all,

Say I have a spreadsheet listed as follows:

A1 = 03/31/05
A2 = $5.00

B1 = 03/31/05
B2 = $10.00

C1 = 04/01/05
C2 = $20.00

The entire A column is named "Base_Date" and the entire B column is
named
"Base_Amount".

I would like a formula that will sum values in the Amount column that
correspond with a specific date range, ie. March only. This formula
must
reside in a different worksheet (within the same workbook).

I've tried the following:

=SUM(IF(Base_Date=DATEVALUE("03/01/2005"),IF(Base_Date<=DATEVALUE("03/31/2005"),Base_Amount,0),0))

If I place the formula in a seperate worksheet from the data (as
intended),
its value is $35.00 (adds all values in column B) when I'm expecting
it
to be
only $15.00.

If I place the formula in the same worksheet as the data (not in
columns
A
or B), its value is reported as 0.

I'm sure I'm missing something miniscule here. Any suggestions?

TIA,
Sleazy






  #23   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Sum of named ranges conditional to date?

(it always gives me an anser of 0).
=SUMIF(A2:A28, "<="&TODAY(), B2:B28)


There's nothing wrong with your formula so that means you have a data
problem. Either your dates aren't true Excel dates and/or your numbers in
column B aren't true numeric numbers.

Dates are really just numbers formatted to look like a date. Try these test
formulas:

=COUNT(A2:A28)

=COUNT(B2:B28)

If every cell in the range B2:B28 contains a true numeric number the COUNT
formula will return 27.

If every cell in the range A2:A28 contains a true Excel date the other COUNT
formula will also return 27.

--
Biff
Microsoft Excel MVP


"NAT" wrote in message
...
I think my request is simpler than all I've seen here and yet I can't get
it
to work (it always gives me an anser of 0). In column A I have dates in
mm/dd/yyyy format, in column B I have amounts. I only want to sum the
amounts in column B if they correspond to a date which is less than or
equal
today's date. Here's what I came up with (which doesn't work):
=SUMIF(A2:A28, "<="&TODAY(), B2:B28)

Can anyone tell me what I'm doing wrong?

"T. Valko" wrote:

If the date in cell X1 is formated same way as above,
the formula does not work, why?.


It should. Try it like this:

=SUMIF($AA$3:$CU$3,"<="&$X$1,$AA4:$CU4)

--
Biff
Microsoft Excel MVP


"Gus" wrote in message
...
The top raw is in the date format ( 1/1/2008 to display Jan-08).
If the date in cell X1 is formated same way as above, the formula does
not
work, why?.
Once I change it to <=39814 then the formula works.

Gus





"T. Valko" wrote:

top row AA3 - CU3 contains months.

In what form? Are they the month names as *TEXT* entrires: Jan, Feb,
Mar?

Are they *DATES* formatted to display the month name?

when I change today's date to a number it works.

How are you changing today's date to a number? What number?

Maybe you want something like this:

=SUMPRODUCT(--(MONTH($AA$3:$CU$3)<MONTH($X$1)),$AA4:$CU4)


--
Biff
Microsoft Excel MVP


"Gus" wrote in message
...
Hi,

I have a similar situation, but with data in rows.
Here is the formula which does not work for me (why?) but when I
change
today's date to a number it works.

=SUMIF($AA$3:$CU$3,<$X$1,$AA4:$CU4)

top row AA3 - CU3 contains months.
below row AA4 - CU4 contains values
my objective is to sum all of the values for past months ( in
comparison
to
current month, which is located in the cell X1)

Thanks, Gus




"SleazyBreezy" wrote:

Hi all,

Say I have a spreadsheet listed as follows:

A1 = 03/31/05
A2 = $5.00

B1 = 03/31/05
B2 = $10.00

C1 = 04/01/05
C2 = $20.00

The entire A column is named "Base_Date" and the entire B column is
named
"Base_Amount".

I would like a formula that will sum values in the Amount column
that
correspond with a specific date range, ie. March only. This formula
must
reside in a different worksheet (within the same workbook).

I've tried the following:

=SUM(IF(Base_Date=DATEVALUE("03/01/2005"),IF(Base_Date<=DATEVALUE("03/31/2005"),Base_Amount,0),0))

If I place the formula in a seperate worksheet from the data (as
intended),
its value is $35.00 (adds all values in column B) when I'm
expecting
it
to be
only $15.00.

If I place the formula in the same worksheet as the data (not in
columns
A
or B), its value is reported as 0.

I'm sure I'm missing something miniscule here. Any suggestions?

TIA,
Sleazy








  #24   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Sum of named ranges conditional to date?

Sorry to butt in but I have a question on a similar topic:

I have a series of payments recieved entered into a sheet with the date
recieved in 1/1/2009 format displayed as 1-Jan-09 in column B. I am
attempting to sum the corresponding payments in columd D that fall within the
same month. I have another column with dates listed as January, February,
March, ect. I am using the following formula but receiving errors:

=SUMIF(MONTH(B:B), 1, D:D) corresponds to January
=SUMIF(MONTH(B:B), 2, D:D) corresponds to February
....ETC.

Where is my logic flawed? I've tried entering it with additional
parenthesis with no luck.

"T. Valko" wrote:

(it always gives me an anser of 0).
=SUMIF(A2:A28, "<="&TODAY(), B2:B28)


There's nothing wrong with your formula so that means you have a data
problem. Either your dates aren't true Excel dates and/or your numbers in
column B aren't true numeric numbers.

Dates are really just numbers formatted to look like a date. Try these test
formulas:

=COUNT(A2:A28)

=COUNT(B2:B28)

If every cell in the range B2:B28 contains a true numeric number the COUNT
formula will return 27.

If every cell in the range A2:A28 contains a true Excel date the other COUNT
formula will also return 27.

--
Biff
Microsoft Excel MVP


"NAT" wrote in message
...
I think my request is simpler than all I've seen here and yet I can't get
it
to work (it always gives me an anser of 0). In column A I have dates in
mm/dd/yyyy format, in column B I have amounts. I only want to sum the
amounts in column B if they correspond to a date which is less than or
equal
today's date. Here's what I came up with (which doesn't work):
=SUMIF(A2:A28, "<="&TODAY(), B2:B28)

Can anyone tell me what I'm doing wrong?

"T. Valko" wrote:

If the date in cell X1 is formated same way as above,
the formula does not work, why?.

It should. Try it like this:

=SUMIF($AA$3:$CU$3,"<="&$X$1,$AA4:$CU4)

--
Biff
Microsoft Excel MVP


"Gus" wrote in message
...
The top raw is in the date format ( 1/1/2008 to display Jan-08).
If the date in cell X1 is formated same way as above, the formula does
not
work, why?.
Once I change it to <=39814 then the formula works.

Gus





"T. Valko" wrote:

top row AA3 - CU3 contains months.

In what form? Are they the month names as *TEXT* entrires: Jan, Feb,
Mar?

Are they *DATES* formatted to display the month name?

when I change today's date to a number it works.

How are you changing today's date to a number? What number?

Maybe you want something like this:

=SUMPRODUCT(--(MONTH($AA$3:$CU$3)<MONTH($X$1)),$AA4:$CU4)


--
Biff
Microsoft Excel MVP


"Gus" wrote in message
...
Hi,

I have a similar situation, but with data in rows.
Here is the formula which does not work for me (why?) but when I
change
today's date to a number it works.

=SUMIF($AA$3:$CU$3,<$X$1,$AA4:$CU4)

top row AA3 - CU3 contains months.
below row AA4 - CU4 contains values
my objective is to sum all of the values for past months ( in
comparison
to
current month, which is located in the cell X1)

Thanks, Gus




"SleazyBreezy" wrote:

Hi all,

Say I have a spreadsheet listed as follows:

A1 = 03/31/05
A2 = $5.00

B1 = 03/31/05
B2 = $10.00

C1 = 04/01/05
C2 = $20.00

The entire A column is named "Base_Date" and the entire B column is
named
"Base_Amount".

I would like a formula that will sum values in the Amount column
that
correspond with a specific date range, ie. March only. This formula
must
reside in a different worksheet (within the same workbook).

I've tried the following:

=SUM(IF(Base_Date=DATEVALUE("03/01/2005"),IF(Base_Date<=DATEVALUE("03/31/2005"),Base_Amount,0),0))

If I place the formula in a seperate worksheet from the data (as
intended),
its value is $35.00 (adds all values in column B) when I'm
expecting
it
to be
only $15.00.

If I place the formula in the same worksheet as the data (not in
columns
A
or B), its value is reported as 0.

I'm sure I'm missing something miniscule here. Any suggestions?

TIA,
Sleazy









  #25   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Sum of named ranges conditional to date?

Try it like this:

=SUMPRODUCT(--(MONTH(B1:B10)=1),D1:D10)

Unless you're using Excel 2007 you can't use entire columns as range
references with the SUMPRODUCT function.

--
Biff
Microsoft Excel MVP


"JP knows excel enough to mess it up" <JP knows excel enough to mess it
wrote in message
...
Sorry to butt in but I have a question on a similar topic:

I have a series of payments recieved entered into a sheet with the date
recieved in 1/1/2009 format displayed as 1-Jan-09 in column B. I am
attempting to sum the corresponding payments in columd D that fall within
the
same month. I have another column with dates listed as January, February,
March, ect. I am using the following formula but receiving errors:

=SUMIF(MONTH(B:B), 1, D:D) corresponds to January
=SUMIF(MONTH(B:B), 2, D:D) corresponds to February
...ETC.

Where is my logic flawed? I've tried entering it with additional
parenthesis with no luck.

"T. Valko" wrote:

(it always gives me an anser of 0).
=SUMIF(A2:A28, "<="&TODAY(), B2:B28)


There's nothing wrong with your formula so that means you have a data
problem. Either your dates aren't true Excel dates and/or your numbers in
column B aren't true numeric numbers.

Dates are really just numbers formatted to look like a date. Try these
test
formulas:

=COUNT(A2:A28)

=COUNT(B2:B28)

If every cell in the range B2:B28 contains a true numeric number the
COUNT
formula will return 27.

If every cell in the range A2:A28 contains a true Excel date the other
COUNT
formula will also return 27.

--
Biff
Microsoft Excel MVP


"NAT" wrote in message
...
I think my request is simpler than all I've seen here and yet I can't
get
it
to work (it always gives me an anser of 0). In column A I have dates
in
mm/dd/yyyy format, in column B I have amounts. I only want to sum the
amounts in column B if they correspond to a date which is less than or
equal
today's date. Here's what I came up with (which doesn't work):
=SUMIF(A2:A28, "<="&TODAY(), B2:B28)

Can anyone tell me what I'm doing wrong?

"T. Valko" wrote:

If the date in cell X1 is formated same way as above,
the formula does not work, why?.

It should. Try it like this:

=SUMIF($AA$3:$CU$3,"<="&$X$1,$AA4:$CU4)

--
Biff
Microsoft Excel MVP


"Gus" wrote in message
...
The top raw is in the date format ( 1/1/2008 to display Jan-08).
If the date in cell X1 is formated same way as above, the formula
does
not
work, why?.
Once I change it to <=39814 then the formula works.

Gus





"T. Valko" wrote:

top row AA3 - CU3 contains months.

In what form? Are they the month names as *TEXT* entrires: Jan,
Feb,
Mar?

Are they *DATES* formatted to display the month name?

when I change today's date to a number it works.

How are you changing today's date to a number? What number?

Maybe you want something like this:

=SUMPRODUCT(--(MONTH($AA$3:$CU$3)<MONTH($X$1)),$AA4:$CU4)


--
Biff
Microsoft Excel MVP


"Gus" wrote in message
...
Hi,

I have a similar situation, but with data in rows.
Here is the formula which does not work for me (why?) but when I
change
today's date to a number it works.

=SUMIF($AA$3:$CU$3,<$X$1,$AA4:$CU4)

top row AA3 - CU3 contains months.
below row AA4 - CU4 contains values
my objective is to sum all of the values for past months ( in
comparison
to
current month, which is located in the cell X1)

Thanks, Gus




"SleazyBreezy" wrote:

Hi all,

Say I have a spreadsheet listed as follows:

A1 = 03/31/05
A2 = $5.00

B1 = 03/31/05
B2 = $10.00

C1 = 04/01/05
C2 = $20.00

The entire A column is named "Base_Date" and the entire B column
is
named
"Base_Amount".

I would like a formula that will sum values in the Amount column
that
correspond with a specific date range, ie. March only. This
formula
must
reside in a different worksheet (within the same workbook).

I've tried the following:

=SUM(IF(Base_Date=DATEVALUE("03/01/2005"),IF(Base_Date<=DATEVALUE("03/31/2005"),Base_Amount,0),0))

If I place the formula in a seperate worksheet from the data (as
intended),
its value is $35.00 (adds all values in column B) when I'm
expecting
it
to be
only $15.00.

If I place the formula in the same worksheet as the data (not in
columns
A
or B), its value is reported as 0.

I'm sure I'm missing something miniscule here. Any suggestions?

TIA,
Sleazy













  #26   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Sum of named ranges conditional to date?



"SleazyBreezy" wrote:

Hi all,

Say I have a spreadsheet listed as follows:

A1 = 03/31/05
A2 = $5.00

B1 = 03/31/05
B2 = $10.00

C1 = 04/01/05
C2 = $20.00

The entire A column is named "Base_Date" and the entire B column is named
"Base_Amount".

I would like a formula that will sum values in the Amount column that
correspond with a specific date range, ie. March only. This formula must
reside in a different worksheet (within the same workbook).

I've tried the following:

=SUM(IF(Base_Date=DATEVALUE("03/01/2005"),IF(Base_Date<=DATEVALUE("03/31/2005"),Base_Amount,0),0))

If I place the formula in a seperate worksheet from the data (as intended),
its value is $35.00 (adds all values in column B) when I'm expecting it to be
only $15.00.

If I place the formula in the same worksheet as the data (not in columns A
or B), its value is reported as 0.

I'm sure I'm missing something miniscule here. Any suggestions?

TIA,
Sleazy


Hi I have a similar issue that I cannot resolve. I wish to summarise all
values by date (for a cash collection spreadsheet) for example

A1 B1
Date Ammount
1/1/9 10
1/1/9 15
2/1/9 12
3/1/9 7

I would like to see the following result in another range of cells:
1/1/9 25
2/1/9 12
3/1/9 7

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
Like 123, allow named ranges, and print named ranges WP Excel Discussion (Misc queries) 1 April 8th 05 06:07 PM
Macro (Print) - Calling Named Ranges KGlennC Excel Discussion (Misc queries) 1 March 19th 05 09:20 PM
Named Ranges Donna Excel Discussion (Misc queries) 3 February 1st 05 11:35 PM
Named Ranges Gary T Excel Worksheet Functions 2 December 27th 04 02:28 AM
Named dynamic ranges, copied worksheets and graph source data WP Charts and Charting in Excel 1 November 28th 04 05:19 PM


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