View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Claus Busch Claus Busch is offline
external usenet poster
 
Posts: 3,872
Default Average data based on unique change in date, ignoring time

Hi,

Am Tue, 8 Oct 2013 20:17:38 +0200 schrieb Claus Busch:

in D1 try:
=IF(COUNTIF($B$1:$B1,B1)=1,AVERAGE(OFFSET(B1,,2,CO UNTIF($B$2:$B$12,B2))),"")


sorry, there is a typo in the formula above.
Try:
=IF(COUNTIF($B$1:$B1,B1)=1,AVERAGE(OFFSET(B1,,2,CO UNTIF($B$1:$B$12,B2))),"")

Or if you prefer to have the result in the row of the last occurence try
in D1:
=IF(B2<B1,AVERAGE(OFFSET(B1,,2,-COUNTIF($B$1:B1,B1))),"")
and copy down.


Regards
Claus B.
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2