beginvbaanalyst
Board Regular
- Joined
- Jan 28, 2020
- Messages
- 141
- Office Version
- 365
- Platform
- Windows
Hello Everyone,
This is my first post so I hope I don't put to much information in here.
I recently decided I wanted to make my work automated and since I use excel daily I came across VBA.
Recently started using Macro Recorder but don't know much about VBA. I've been watching videos daily for the past week.
Currently I'm having an issue when I run my macro it doesn't always complete the set of data provided within each column.
Is there a way to instead of running a selected range, have the macro run until the end of the set of data within each column?
Provided Below is the Macro Recorder Code
Range("I1").Select 'Selection of Column I, Row One ("I1")
ActiveCell.FormulaR1C1 = "ARTICLE" 'Naming Selection "I1", ("Article")
Range("J1").Select 'Selection of Column J, Row One ("J1")
ActiveCell.FormulaR1C1 = "VENDOR" 'Naming Selection "J1",("Vendor")
Range("K1").Select 'Selection of Column K, Row One ("K1")
ActiveCell.FormulaR1C1 = "REGULAR" 'Naming Selection "K1"), ("Regular")
Range("L1").Select 'Selection of Column L, Row one ("L1")
ActiveCell.FormulaR1C1 = "BURRIS" 'Naming Selection ("L1"), ("Burris")
Range("M1").Select 'Selection of Column M, ROw One ("M1")
ActiveCell.FormulaR1C1 = "B REG" 'Naming Selection ("M1"), ("B REG")
Range("I2").Select 'Selection of Column I, Row Two ("I2")
ActiveCell.FormulaR1C1 = "" 'Don't know what this does yet
Range("B2").Select 'Selection of Column B, Row 2 ("B2")
Range(Selection, Selection.End(xlDown)).Select 'Selected Range Until Last Row Entry
Selection.Copy 'Copy Selected Range
Range("I2").Select 'Selected Paste Area ("I2")
ActiveSheet.Paste 'Selected ("I2")
Application.CutCopyMode = False 'Pasted Selected Range into Column I, Row Two ("I2")
This is my first post so I hope I don't put to much information in here.
I recently decided I wanted to make my work automated and since I use excel daily I came across VBA.
Recently started using Macro Recorder but don't know much about VBA. I've been watching videos daily for the past week.
Currently I'm having an issue when I run my macro it doesn't always complete the set of data provided within each column.
Is there a way to instead of running a selected range, have the macro run until the end of the set of data within each column?
Provided Below is the Macro Recorder Code
Range("I1").Select 'Selection of Column I, Row One ("I1")
ActiveCell.FormulaR1C1 = "ARTICLE" 'Naming Selection "I1", ("Article")
Range("J1").Select 'Selection of Column J, Row One ("J1")
ActiveCell.FormulaR1C1 = "VENDOR" 'Naming Selection "J1",("Vendor")
Range("K1").Select 'Selection of Column K, Row One ("K1")
ActiveCell.FormulaR1C1 = "REGULAR" 'Naming Selection "K1"), ("Regular")
Range("L1").Select 'Selection of Column L, Row one ("L1")
ActiveCell.FormulaR1C1 = "BURRIS" 'Naming Selection ("L1"), ("Burris")
Range("M1").Select 'Selection of Column M, ROw One ("M1")
ActiveCell.FormulaR1C1 = "B REG" 'Naming Selection ("M1"), ("B REG")
Range("I2").Select 'Selection of Column I, Row Two ("I2")
ActiveCell.FormulaR1C1 = "" 'Don't know what this does yet
Range("B2").Select 'Selection of Column B, Row 2 ("B2")
Range(Selection, Selection.End(xlDown)).Select 'Selected Range Until Last Row Entry
Selection.Copy 'Copy Selected Range
Range("I2").Select 'Selected Paste Area ("I2")
ActiveSheet.Paste 'Selected ("I2")
Application.CutCopyMode = False 'Pasted Selected Range into Column I, Row Two ("I2")