ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How to compare a cell containing a date in sumif criteria (https://www.excelbanter.com/excel-worksheet-functions/191064-how-compare-cell-containing-date-sumif-criteria.html)

Retired Nick

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.

PCLIVE

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.




Bernard Liengme

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.




Retired Nick

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.





Retired Nick

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.





PCLIVE

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.








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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com