ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Add Between Two Dates Q (https://www.excelbanter.com/excel-worksheet-functions/118287-add-between-two-dates-q.html)

Sean

Add Between Two Dates Q
 
I wish to Add up values within a variable list of Date between two
dates, these dates in themselves will vary from day to day.

The two relevant dates will reside in Z1 and Z2 (from and to dates)
My table of values will be in Sheet2 and show Sales by location by
Date. Thus the location will be in Column A, Date relevant to each Sale
in Column B and Sales value in Column C.

What I am looking to acheive is add up all Sales for each location
between the two date values above. Just to automate it slightly more
the location will be referenced in Column A in Sheet1, eg. London will
be the value in A5, Paris in A6 etc, these location values will mirror
the text in my database.

I would appreciate any guidance


Bob Phillips

Add Between Two Dates Q
 
=SUMPRODUCT(--(Sheet2!$A$1:$A$100=$A5),--(Sheet2!$B$1:$B$100=$Z$1),
--(Sheet2!$B$1:$B$100<=$Z$2),Sheet2!$C$1:$C$100)

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Sean" wrote in message
oups.com...
I wish to Add up values within a variable list of Date between two
dates, these dates in themselves will vary from day to day.

The two relevant dates will reside in Z1 and Z2 (from and to dates)
My table of values will be in Sheet2 and show Sales by location by
Date. Thus the location will be in Column A, Date relevant to each Sale
in Column B and Sales value in Column C.

What I am looking to acheive is add up all Sales for each location
between the two date values above. Just to automate it slightly more
the location will be referenced in Column A in Sheet1, eg. London will
be the value in A5, Paris in A6 etc, these location values will mirror
the text in my database.

I would appreciate any guidance




Sean

Add Between Two Dates Q
 
Thanks Bob, works perfect


Bob Phillips wrote:
=SUMPRODUCT(--(Sheet2!$A$1:$A$100=$A5),--(Sheet2!$B$1:$B$100=$Z$1),
--(Sheet2!$B$1:$B$100<=$Z$2),Sheet2!$C$1:$C$100)

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Sean" wrote in message
oups.com...
I wish to Add up values within a variable list of Date between two
dates, these dates in themselves will vary from day to day.

The two relevant dates will reside in Z1 and Z2 (from and to dates)
My table of values will be in Sheet2 and show Sales by location by
Date. Thus the location will be in Column A, Date relevant to each Sale
in Column B and Sales value in Column C.

What I am looking to acheive is add up all Sales for each location
between the two date values above. Just to automate it slightly more
the location will be referenced in Column A in Sheet1, eg. London will
be the value in A5, Paris in A6 etc, these location values will mirror
the text in my database.

I would appreciate any guidance




All times are GMT +1. The time now is 08:59 AM.

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