View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
LiAD LiAD is offline
external usenet poster
 
Posts: 386
Default Auto formula copy

Hi,

The following code will copy formulas from preset cells down to a certain
row (in this case 500).

How can I change this code to get it to auto fill to where the last line I
need is, based on a set condition, say that cell d of the same row is not=""?

Range("V3:AA3").Select
Selection.AutoFill Destination:=Range("V3:AA500"), Type:=xlFillDefault
Range("V3:AA500").Select

At the moment this part of a sub driven through a form button. Each sheet
this applies do does not have the same cell ranges to copy so the cells to
copy from and to are specified per sheet. Is it possible this can be put in
as a workbook code and run automatically in all the sheets in the workbook?

Thanks