ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Add Column Data with Twist (https://www.excelbanter.com/excel-worksheet-functions/95877-add-column-data-twist.html)

John

Add Column Data with Twist
 
I have 2 columns, one showing Sales (Col B) and one showing Hours (Col A) -
This shows the Sales per Hour

How can I add up the Total Sales for a given Start Time and End Time. These
two values will be in two cells, say AA1 and AA2

Thus if AA1 said 9:30am and AA2 said 13:45am, what would be the formula that
would give me the correct answer?

Note my Hour divisions are in Qtr hour, as are my Sales values

Thanks




excelent

Add Column Data with Twist
 
=SUMPRODUCT((A2:A40=AA1)*(A2:A40<=AA2)*(B2:B40))


Franz Verga

Add Column Data with Twist
 
Nel post
*John* ha scritto:

I have 2 columns, one showing Sales (Col B) and one showing Hours
(Col A) - This shows the Sales per Hour

How can I add up the Total Sales for a given Start Time and End Time.
These two values will be in two cells, say AA1 and AA2

Thus if AA1 said 9:30am and AA2 said 13:45am, what would be the
formula that would give me the correct answer?

Note my Hour divisions are in Qtr hour, as are my Sales values

Thanks


Hi John,

Try this:

=SUMPRODUCT((A2:A1000=AA1)*(A2:A1000<=AA2)*(B2:B1 000))


--
Hope I helped you.

Thanks in advance for your feedback.

Ciao

Franz Verga from Italy



John

Add Column Data with Twist
 
Many thanks Franz

I 've just added a post on my previous 'round up to next 15 mins' perhaps
you could have a look

Thanks


"Franz Verga" wrote in message
...
Nel post
*John* ha scritto:

I have 2 columns, one showing Sales (Col B) and one showing Hours
(Col A) - This shows the Sales per Hour

How can I add up the Total Sales for a given Start Time and End Time.
These two values will be in two cells, say AA1 and AA2

Thus if AA1 said 9:30am and AA2 said 13:45am, what would be the
formula that would give me the correct answer?

Note my Hour divisions are in Qtr hour, as are my Sales values

Thanks


Hi John,

Try this:

=SUMPRODUCT((A2:A1000=AA1)*(A2:A1000<=AA2)*(B2:B1 000))


--
Hope I helped you.

Thanks in advance for your feedback.

Ciao

Franz Verga from Italy





All times are GMT +1. The time now is 09:54 AM.

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