Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel formula help needed

Status
Not open for further replies.

henio

MIS
Jun 25, 2003
60
GB
Hi all,

I have a sheet containing two columns:

Date Qty
1 Nov 1
2 Nov 2
3 Nov 1
4 Nov 4
etc

When the user enters a date on another sheet, I would like to get the average Qty for the prior 7 days.

e.g. User enters date of 12 Nov. I would like to retrieve the average qty for the dates 6 Nov thru 12 Nov. I've tried an array formula with nested 'if's with no success.

Any help would be appreciated.

Cheers,
Henio
 
Look to the database functions of excel

dcount
dsum
daverage

the help illustrates the useage

you will setup you citeria as a copy of the headings in your "data columns" in your case add another date col

under one date heading...=&quot;<=&quot;& start date ,
under the other the formula =&quot;>=&quot;&(cell_ref of start date-7)

usage:
=davergage(columns with date and qty,&quot;qty&quot;,cel ref copy of copy headers of headers,




 
Ooops...


=daverage(columns with date and qty,&quot;qty&quot;,cel ref copy of data headers)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top