View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bernard Liengme Bernard Liengme is offline
external usenet poster
 
Posts: 4,393
Default Adding Row Number to Column

I have headings (labels) in row 1 (Date, A,B,C,D,E)
In A2:30 I have dates
In B2:F30 I have numeric values
In H1 I have a start date, in I1 an end date
In J1 I used
=SUMPRODUCT((A2:A30=H1)*(A2:A30<=I1)*B2:F30)/(SUMPRODUCT((A2:A30=H1)*(A2:A30<=I1))*5)
to find the average of the values.
The = and <= means I include both dates.
For more on SUMPRODUCT see
http://www.xldynamic.com/source/xld.SUMPRODUCT.html

best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"Len C" <Len wrote in message
...
I have a worksheet with consecutive dates in column A and blood glucose
figures across the page in 5 columns. I wish to be able to enter start and
finish dates and automatically find those dates and calulate the averages
betwen dates. I can find the ROW by using "Match" but don't know how to
use
this info to identify the columns I wish to "AVERAGE" or "SUM". All help
appreciated