VBA – Autofill with a Macro

Associated Files Download Links


Autofill in VBA

Take control of Autofill using vba with this simple macro code example. It takes the data from the range A1:A2 and autifills it to A20. This can be modified to autofill any way you would like using a little macro tweaking.

Selection1 is the range with the data to autofill.

Selection2 is the entire range to autofill, this includes the first range plus the blank spaces to autofill.

Here’s the before and after picture

tiphacks4

VBA Coding Made Easy

Stop searching for VBA code online. Learn more about AutoMacro – A VBA Code Builder that allows beginners to code procedures from scratch with minimal coding knowledge and with many time-saving features for all users!

alt text

Learn More!


<<Return to VBA Examples

Did you find this VBA tutorial useful? Then share it with your friends and colleagues: