A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Sum of named ranges conditional to date?



 
 
Thread Tools Display Modes
  #21  
Old March 24th, 2009, 08:30 AM posted to microsoft.public.excel.worksheet.functions
Roger Govier[_3_]
external usenet poster
 
Posts: 2,297
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  
Old June 12th, 2009, 12:45 AM posted to microsoft.public.excel.worksheet.functions
Nat
external usenet poster
 
Posts: 194
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  
Old June 12th, 2009, 01:48 AM posted to microsoft.public.excel.worksheet.functions
T. Valko
external usenet poster
 
Posts: 15,759
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  
Old June 19th, 2009, 08:23 PM posted to microsoft.public.excel.worksheet.functions
JP knows excel enough to mess it up
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) corresponds to January
=SUMIF(MONTH(B:B), 2, 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  
Old June 19th, 2009, 09:04 PM posted to microsoft.public.excel.worksheet.functions
T. Valko
external usenet poster
 
Posts: 15,759
Default Sum of named ranges conditional to date?

Try it like this:

=SUMPRODUCT(--(MONTH(B1:B10)=1),D110)

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) corresponds to January
=SUMIF(MONTH(B:B), 2, 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  
Old June 24th, 2009, 10:46 AM posted to microsoft.public.excel.worksheet.functions
Nigel P[_2_]
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

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Like 123, allow named ranges, and print named ranges WP General Discussion 1 April 8th, 2005 06:07 PM
Aggregating Date Data into Weeks and Quarters Roger Running & Setting Up Queries 3 July 11th, 2004 05:56 PM
How Do You Call Several Named Ranges From A Named Range Minitman Worksheet Functions 14 March 24th, 2004 11:18 PM
Copying Worksheets with Named Ranges Anthony Cravero Worksheet Functions 3 December 19th, 2003 06:05 PM
Counting cells with specific date ranges Dino Worksheet Functions 1 October 9th, 2003 08:00 PM


All times are GMT +1. The time now is 12:17 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.