View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
nougain nougain is offline
external usenet poster
 
Posts: 1
Default UDF to compute using ranges


I have two sheets in my workbook. In sheet 1, Column A (say sellingDate)
has dates and column B (say apples) has some numbers. In sheet 2 I have
column A (say givenFridayDate) where I have dates and column B
(calAverage) where I need to calculate some valve using the UDF.

What I need to do is to have some function that takes givenFridayDate
value and return average of apples sold for sellingDate less than equal
to givenFridayDate and greater than the date that falls 5 days back from
givenFridayDate (i.e. Last sunday).

I don't know how to use Ranges and filter the data that falls within
given dates. Please suggest some solution. Thanks.


--
nougain
------------------------------------------------------------------------
nougain's Profile: http://www.excelforum.com/member.php...o&userid=32031
View this thread: http://www.excelforum.com/showthread...hreadid=517826