ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   sumif using today's date (https://www.excelbanter.com/excel-discussion-misc-queries/54422-sumif-using-todays-date.html)

Eqa

sumif using today's date
 
I am trying to use SUMIF. In column A I have dates and column B there are
dollar values. I am trying to sum all dollar values due from today out to the
next 7 days. How do I add 2 criteria to the sumif formula?

Peo Sjoblom

sumif using today's date
 
2 ways

=SUMIF(A2:A30,"="&TODAY(),B2:B30)-SUMIF(A2:A30,""&TODAY()+7,B2:B30)

format result as non date

or

=SUMPRODUCT(--(A2:A30=TODAY()),--(A2:A30<=TODAY()+7),B2:B30)

--
Regards,

Peo Sjoblom

(No private emails please)


"Eqa" wrote in message
...
I am trying to use SUMIF. In column A I have dates and column B there are
dollar values. I am trying to sum all dollar values due from today out to
the
next 7 days. How do I add 2 criteria to the sumif formula?



Biff

sumif using today's date
 
Hi!

Try one of these:

=SUMIF(A1:A13,"="&TODAY(),B1:B13)-SUMIF(A1:A13,""&TODAY()+7,B1:B13)

=SUMPRODUCT(--(A1:A13=TODAY()),--(A1:A13<=TODAY()+7),B1:B13)

You could even use a helper cell:

C1 =TODAY()

Then:

=SUMIF(A1:A13,"="&C1,B1:B13)-SUMIF(A1:A13,""&C1+7,B1:B13)

=SUMPRODUCT(--(A1:A13=C1),--(A1:A13<=C1+7),B1:B13)

Biff

"Eqa" wrote in message
...
I am trying to use SUMIF. In column A I have dates and column B there are
dollar values. I am trying to sum all dollar values due from today out to
the
next 7 days. How do I add 2 criteria to the sumif formula?




Eqa

sumif using today's date
 
Thanks That is great and NOW seems so easy.

"Peo Sjoblom" wrote:

2 ways

=SUMIF(A2:A30,"="&TODAY(),B2:B30)-SUMIF(A2:A30,""&TODAY()+7,B2:B30)

format result as non date

or

=SUMPRODUCT(--(A2:A30=TODAY()),--(A2:A30<=TODAY()+7),B2:B30)

--
Regards,

Peo Sjoblom

(No private emails please)


"Eqa" wrote in message
...
I am trying to use SUMIF. In column A I have dates and column B there are
dollar values. I am trying to sum all dollar values due from today out to
the
next 7 days. How do I add 2 criteria to the sumif formula?





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

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