ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   NEED ASAP (https://www.excelbanter.com/excel-discussion-misc-queries/141132-need-asap.html)

Vick

NEED ASAP
 
I have a list of dates with values next to it. I want to always, based on the
date, look at the previous 4 numbers. Ex.

04/04/2007 1.00
04/05/2007 1.00
04/06/2007 1.00
04/10/2007 0.00
04/13/2007 1.00
04/16/2007 0.00
04/17/2007 0.00

So lets say the current date is 4/16/07, the sum would be 3, but if they
date were the the 17th the number would be 2, looking at the 16, 13, 10, 6. I
want to sum the last 4 numbers after a given date. Any help you can give,
THANKS


Toppers

NEED ASAP
 
Data in columns A & B, and comparison data in C1:

Try:

=SUM(OFFSET($B$1,MATCH($C$1,A1:A100,0)-5,0,4,1))

HTH

"Vick" wrote:

I have a list of dates with values next to it. I want to always, based on the
date, look at the previous 4 numbers. Ex.

04/04/2007 1.00
04/05/2007 1.00
04/06/2007 1.00
04/10/2007 0.00
04/13/2007 1.00
04/16/2007 0.00
04/17/2007 0.00

So lets say the current date is 4/16/07, the sum would be 3, but if they
date were the the 17th the number would be 2, looking at the 16, 13, 10, 6. I
want to sum the last 4 numbers after a given date. Any help you can give,
THANKS



All times are GMT +1. The time now is 02:18 PM.

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