Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,560
Default SUMPRODUCT with Date() -60

Hello all,
I have constructed this
=SUMPRODUCT(--('Sites_A-K'!G:G=A2),--('Sites_A-K'!I:I< (date()-60)))

in my attempts to count the rows where column 'Sites_A-K'!G:G = A2 and
column 'Sites_A-K'!I:I is less than today minus 60 days.

Cell A2 is text. Column G is text. Column I is date format.

I'm not getting an error, the cursor goes to the date() section of the
formula. I have changed date() to today() and getting a #NUM! error.

Any assistance you can provide is greatly appreciated.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default SUMPRODUCT with Date() -60

Unless you're using Excel 2007 you can't use entire columns as range
references in SUMPRODUCT. Use a smaller range.

=SUMPRODUCT(--('Sites_A-K'!G1:G1000=A2),--('Sites_A-K'!I1:I1000<TODAY()-60))

However, if you *absolutely need* to reference the entire column try it like
this:

=SUMPRODUCT(--('Sites_A-K'!G1:G65535=A2),--('Sites_A-K'!I1:I65535<TODAY()-60))+('Sites_A-K'!G65536=A2)*('Sites_A-K'!I65536<TODAY()-60)

That'll be one slow to calculate formula!

--
Biff
Microsoft Excel MVP


"David" wrote in message
...
Hello all,
I have constructed this
=SUMPRODUCT(--('Sites_A-K'!G:G=A2),--('Sites_A-K'!I:I< (date()-60)))

in my attempts to count the rows where column 'Sites_A-K'!G:G = A2 and
column 'Sites_A-K'!I:I is less than today minus 60 days.

Cell A2 is text. Column G is text. Column I is date format.

I'm not getting an error, the cursor goes to the date() section of the
formula. I have changed date() to today() and getting a #NUM! error.

Any assistance you can provide is greatly appreciated.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,560
Default SUMPRODUCT with Date() -60

Works well now, thank you.

"T. Valko" wrote:

Unless you're using Excel 2007 you can't use entire columns as range
references in SUMPRODUCT. Use a smaller range.

=SUMPRODUCT(--('Sites_A-K'!G1:G1000=A2),--('Sites_A-K'!I1:I1000<TODAY()-60))

However, if you *absolutely need* to reference the entire column try it like
this:

=SUMPRODUCT(--('Sites_A-K'!G1:G65535=A2),--('Sites_A-K'!I1:I65535<TODAY()-60))+('Sites_A-K'!G65536=A2)*('Sites_A-K'!I65536<TODAY()-60)

That'll be one slow to calculate formula!

--
Biff
Microsoft Excel MVP


"David" wrote in message
...
Hello all,
I have constructed this
=SUMPRODUCT(--('Sites_A-K'!G:G=A2),--('Sites_A-K'!I:I< (date()-60)))

in my attempts to count the rows where column 'Sites_A-K'!G:G = A2 and
column 'Sites_A-K'!I:I is less than today minus 60 days.

Cell A2 is text. Column G is text. Column I is date format.

I'm not getting an error, the cursor goes to the date() section of the
formula. I have changed date() to today() and getting a #NUM! error.

Any assistance you can provide is greatly appreciated.




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default SUMPRODUCT with Date() -60

Ooops!

I just realized that empty cells will evaluate to be TRUE in:

'Sites_A-K'!I1:I65535<TODAY()-60

If there will not be empty cells in that range then it's not a problem. If
there might be empty cells in that range then you'd need to add another
expression to the formula.

So, if you *don't need* to reference the entire column don't do it!

If you don't know where the range will end then use a dynamic range:

http://contextures.com/xlNames01.html#Dynamic



--
Biff
Microsoft Excel MVP


"T. Valko" wrote in message
...
Unless you're using Excel 2007 you can't use entire columns as range
references in SUMPRODUCT. Use a smaller range.

=SUMPRODUCT(--('Sites_A-K'!G1:G1000=A2),--('Sites_A-K'!I1:I1000<TODAY()-60))

However, if you *absolutely need* to reference the entire column try it
like this:

=SUMPRODUCT(--('Sites_A-K'!G1:G65535=A2),--('Sites_A-K'!I1:I65535<TODAY()-60))+('Sites_A-K'!G65536=A2)*('Sites_A-K'!I65536<TODAY()-60)

That'll be one slow to calculate formula!

--
Biff
Microsoft Excel MVP


"David" wrote in message
...
Hello all,
I have constructed this
=SUMPRODUCT(--('Sites_A-K'!G:G=A2),--('Sites_A-K'!I:I< (date()-60)))

in my attempts to count the rows where column 'Sites_A-K'!G:G = A2 and
column 'Sites_A-K'!I:I is less than today minus 60 days.

Cell A2 is text. Column G is text. Column I is date format.

I'm not getting an error, the cursor goes to the date() section of the
formula. I have changed date() to today() and getting a #NUM! error.

Any assistance you can provide is greatly appreciated.





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 with more than one date CC Excel Discussion (Misc queries) 5 May 18th 06 10:44 AM
Use SUMPRODUCT with a Date msbutton27 Excel Discussion (Misc queries) 1 January 26th 06 04:30 AM
if, sumproduct, help by date Jim Excel Worksheet Functions 3 January 20th 06 10:42 PM
SUMPRODUCT + DATE = 0 nfbelo Excel Worksheet Functions 5 May 24th 05 02:10 PM
SUMPRODUCT + DATE = 0 nfbelo Excel Worksheet Functions 0 May 24th 05 09:38 AM


All times are GMT +1. The time now is 06:02 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"