View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
bdcrisp[_25_] bdcrisp[_25_] is offline
external usenet poster
 
Posts: 1
Default VBA auto fill problems


Modify the bottom of your code

"=IF(COUNTIF(R1C2:R[-1]C[-1],""0"")=R1C4,AVERAGE(OFFSET(R[-1]C[-1],0,0,-R1C4)),"""")"
Range("C2").Select
Selection.AutoFill Destination:=Range("C2:C"
ActiveSheet.UsedRange.Rows.Count)
End Sub

'This will fill to the maximum number of used rows on the sheet.

'Let me know how that works out for yo

--
bdcris

-----------------------------------------------------------------------
bdcrisp's Profile: http://www.excelforum.com/member.php...nfo&userid=356
View this thread: http://www.excelforum.com/showthread.php?threadid=26296