trying to populate a range, but the range destination always changes. how can i adjust the populated cell range (listed as A3:A12 below) with some kind of variable that will adjust "A12" based on the cell range of column b? such as B3-B19 so A3-A19 fills with A2 in one sheet and B3-B49 on another sheet means that B3-B49 fills with A2 on another sheet without having to change the macro everytime... thanks!
Sub Space_delimiter2col()
Application.DisplayAlerts = False
With Range(Selection.Cells, Selection.Cells.End(xlDown))
.TextToColumns Destination:=.Cells(1, 1), _
DataType:=xlDelimited, _
Space:=True
End With
Columns("A:A").Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Range("A2").Value = "Switch"
Range("A3:A12").Value = Range("B1").Value
Rows(1).EntireRow.Delete
End Sub