View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz JLGWhiz is offline
external usenet poster
 
Posts: 3,986
Default Want a macro for multiple columns on current macro for column

It only works one column at a time.

"Valerie" wrote:

I am currently using the following macro in many of my worksheets and love
the time it saves. It's for one column. My question is, can this be
modified to do 2 or more columns?

Dim endRow As Long
endRow = Cells(Rows.Count, 1).End(xlUp).Row
Range("A2").AutoFill Destination:=Range("A2:A" & endRow)

I have formulas in A2 and B2 and want to autofill at the same time instead
of separately. I tried modifying (Range("A2:B2"),etc.) but can't get it to
work.

Any help would be greatly appreciated!