AussieSteve
New Member
- Joined
- Dec 28, 2017
- Messages
- 18
- Office Version
- 365
- Platform
- Windows
Hi guys.
Im just starting out with VBA in Excel, and have a question like millions before me, anyway it goes like this. I want to add my own column header names using VBA , and have used running a macro with success, but now want to shorten the code to a few lines of code rather then about 20 + that it now stands at. This is what the macro looks like at the start, I am in the process of learning methods, syntax, objects etc and it's a lot to take in and know exactly what to look for to solve even smallest prob like mine. Any help would be appreciated to move me on in my VBA journey.
Thanks.
ActiveCell.FormulaR1C1 = "dogs"
Range("C1").Select
ActiveCell.FormulaR1C1 = "cats"
Range("D1").Select
ActiveCell.FormulaR1C1 = "birds"
Im just starting out with VBA in Excel, and have a question like millions before me, anyway it goes like this. I want to add my own column header names using VBA , and have used running a macro with success, but now want to shorten the code to a few lines of code rather then about 20 + that it now stands at. This is what the macro looks like at the start, I am in the process of learning methods, syntax, objects etc and it's a lot to take in and know exactly what to look for to solve even smallest prob like mine. Any help would be appreciated to move me on in my VBA journey.
Thanks.
ActiveCell.FormulaR1C1 = "dogs"
Range("C1").Select
ActiveCell.FormulaR1C1 = "cats"
Range("D1").Select
ActiveCell.FormulaR1C1 = "birds"