Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default How to compare a cell containing a date in sumif criteria

I have a sumif function to return a report from a worksheet and would like to
make the condition refer to another cell (in the same workbook).

E.g.

This works...

A2: =SUMIF(A5:A100,"=11/01/07",E5:E100)

But this doesn't...

A1: 11/01/07
A2: =SUMIF(A5:A100,"="&A1,E5:E100)

A5: 11/20/07
A6: 12/20/07
A7: 08/20/07
....

How do I make the condition be that the range has to be greater than the
date in cell A1?

Thanks for your help.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,311
Default How to compare a cell containing a date in sumif criteria

It works for me. Check to make sure that the dates in your range are actual
dates and not just text.

Regards,
Paul

--

"Retired Nick" wrote in message
...
I have a sumif function to return a report from a worksheet and would like
to
make the condition refer to another cell (in the same workbook).

E.g.

This works...

A2: =SUMIF(A5:A100,"=11/01/07",E5:E100)

But this doesn't...

A1: 11/01/07
A2: =SUMIF(A5:A100,"="&A1,E5:E100)

A5: 11/20/07
A6: 12/20/07
A7: 08/20/07
...

How do I make the condition be that the range has to be greater than the
date in cell A1?

Thanks for your help.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,393
Default How to compare a cell containing a date in sumif criteria

Or try =SUMIF(A5:A100,DATE(2007,01,11),E5:E100)
Note clear from you example what date format you use - I took 01 as month
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Retired Nick" wrote in message
...
I have a sumif function to return a report from a worksheet and would like
to
make the condition refer to another cell (in the same workbook).

E.g.

This works...

A2: =SUMIF(A5:A100,"=11/01/07",E5:E100)

But this doesn't...

A1: 11/01/07
A2: =SUMIF(A5:A100,"="&A1,E5:E100)

A5: 11/20/07
A6: 12/20/07
A7: 08/20/07
...

How do I make the condition be that the range has to be greater than the
date in cell A1?

Thanks for your help.



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default How to compare a cell containing a date in sumif criteria

Format, Cells shows them as dates - is there any other way to tell?

"PCLIVE" wrote:

It works for me. Check to make sure that the dates in your range are actual
dates and not just text.

Regards,
Paul

--

"Retired Nick" wrote in message
...
I have a sumif function to return a report from a worksheet and would like
to
make the condition refer to another cell (in the same workbook).

E.g.

This works...

A2: =SUMIF(A5:A100,"=11/01/07",E5:E100)

But this doesn't...

A1: 11/01/07
A2: =SUMIF(A5:A100,"="&A1,E5:E100)

A5: 11/20/07
A6: 12/20/07
A7: 08/20/07
...

How do I make the condition be that the range has to be greater than the
date in cell A1?

Thanks for your help.




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default How to compare a cell containing a date in sumif criteria


Thanks but the reason that I want a cell to contain the criteria date is
because I have a number of similar queries and I don't want to go updating
each of the formulas every time the date changes

"Bernard Liengme" wrote:

Or try =SUMIF(A5:A100,DATE(2007,01,11),E5:E100)
Note clear from you example what date format you use - I took 01 as month
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Retired Nick" wrote in message
...
I have a sumif function to return a report from a worksheet and would like
to
make the condition refer to another cell (in the same workbook).

E.g.

This works...

A2: =SUMIF(A5:A100,"=11/01/07",E5:E100)

But this doesn't...

A1: 11/01/07
A2: =SUMIF(A5:A100,"="&A1,E5:E100)

A5: 11/20/07
A6: 12/20/07
A7: 08/20/07
...

How do I make the condition be that the range has to be greater than the
date in cell A1?

Thanks for your help.






  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,311
Default How to compare a cell containing a date in sumif criteria

Try changing the format of A5 (from your example) to General. If it was a
true date, then it should change to 39406. If does not do that and it still
shows 11/20/07, then the contents in A5 is not being seen as an actual date.
Look for leading or trailing spaces or unseen characters.

You might try this formula instead.

=SUMPRODUCT(--(A5:A100=A1),E5:E100)

Does that help?
Paul

--

"Retired Nick" wrote in message
...
Format, Cells shows them as dates - is there any other way to tell?

"PCLIVE" wrote:

It works for me. Check to make sure that the dates in your range are
actual
dates and not just text.

Regards,
Paul

--

"Retired Nick" wrote in message
...
I have a sumif function to return a report from a worksheet and would
like
to
make the condition refer to another cell (in the same workbook).

E.g.

This works...

A2: =SUMIF(A5:A100,"=11/01/07",E5:E100)

But this doesn't...

A1: 11/01/07
A2: =SUMIF(A5:A100,"="&A1,E5:E100)

A5: 11/20/07
A6: 12/20/07
A7: 08/20/07
...

How do I make the condition be that the range has to be greater than
the
date in cell A1?

Thanks for your help.






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
using a date in criteria for SUMIF Will Excel Discussion (Misc queries) 1 April 9th 07 05:58 PM
Sumif with two criteria including a date range Ladyofthewhitecity Excel Discussion (Misc queries) 4 February 4th 07 10:53 AM
tow criteria (Date and Name)in sumif Rolf Excel Discussion (Misc queries) 2 December 3rd 06 10:36 PM
Calculate a SUMIF if criteria is between 2 date ranges Anthony P Excel Worksheet Functions 4 October 13th 06 05:12 PM
SUMIF/SUMPRODUCT/IF - 2 criteria - Date and Text James T Excel Discussion (Misc queries) 4 May 25th 06 08:00 PM


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