Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Excel AUTOFILL WITH VBA
#1
AUTOFILL WITH VBA


1. open a new file and insert button
2. save as macro enabled excel file
3. assign macro to the button and paste below code


Sub Button1_Click()

Dim range1 As Range

Dim range2 As Range
 
Set range1 = Sheet1.Range("A1:A2")

Set range2 = Sheet1.Range("A1:A10")

range1.AutoFill Destination:=range2

End Sub
Reply
#1
AUTOFILL WITH VBA


1. open a new file and insert button
2. save as macro enabled excel file
3. assign macro to the button and paste below code


Sub Button1_Click()

Dim range1 As Range

Dim range2 As Range
 
Set range1 = Sheet1.Range("A1:A2")

Set range2 = Sheet1.Range("A1:A10")

range1.AutoFill Destination:=range2

End Sub
Reply
CAA


Forum Jump:


Users browsing this thread: 1 Guest(s)