Thread: Fill Macro II
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Mike Mike is offline
external usenet poster
 
Posts: 3,101
Default Fill Macro II

Below is my earlier question.. My new problem is that the autofill command
doesn't seem to work when the selected area is two-dimensional. For example,
if I want to take several adjacent cells in a row and fill them down, the
macro crashes. I'm wondering if I should try using a "FillDown" command
rather than AutoFill. I think this can definitely be done, but I'm not sure
what the parameters of the command would be... Any thoughts? (I'd like to
create a macro to do fill right in this case, too.)

Thanks!

Actually, try this, after selecting the cell to copy, and the area that you want to fill in:

Sub FillDownSelection()
Selection(1).AutoFill Destination:=Selection, Type:=xlFillValues
End Sub

HTH,
Bernie
MS Excel MVP


"Mike" wrote in message
...
Is there a way to design a macro that can perform the 'fill down without
formatting' procedure for cells that I highlight? I've tried to write it but
it busts if I select a different number of cells that I used when I recorded
it. Thanks for the help!