View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
mudraker[_53_] mudraker[_53_] is offline
external usenet poster
 
Posts: 1
Default Autofilling a formula to a variable last cell


Dave

I lost track of this thread so i am not sure if you got your problem
solved.

If not - the only way I know of solving your problem is to do it in 2
steps

step 1 auto fill rows as per my previos suggestion then auto fill
columns

dim Row
dim Col

Row = ActiveSheet.UsedRange.Rows.Count
Col = ActiveSheet.UsedRange.Columns.Count

Range("q2").AutoFill Destination:=Range("q2:q" & Row),
Type:=xlFillDefault


Range("q2:q" & Row).AutoFill Destination:=Range("q2:" & Col & row),
Type:=xlFillDefault


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/

~~Now Available: Financial Statements.xls, a step by step guide to creating financial statements