Thank you very much. This did the trick. I have one question though. What
am I telling the program to do when I give it the "&
ActiveSheet.UsedRange.Rows.Count" command?
"bdcrisp" wrote:
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 you
--
bdcrisp
------------------------------------------------------------------------
bdcrisp's Profile: http://www.excelforum.com/member.php...fo&userid=3564
View this thread: http://www.excelforum.com/showthread...hreadid=262963