So I've been trying to get my vba code to autofill a column. The 2nd cell in that column has a formula.
Dim nextEmptyColumn As Range
Set nextEmptyColumn = Worksheets("Sheet1").Range("A1").End(xlToRight).Offset(0, 1)
nextEmptyColumn.Value = "AlertKey"
nextEmptyColumn.Offset(1).Formula = "=(MID(Sheet1!D2,FIND(""AlertKey:"",Sheet1!D2)+LEN(""AlertKey:""),FIND(""AlertGroup"",Sheet1!D2)-FIND(""AlertKey:"",Sheet1!D2)-LEN(""AlertKey:"")))"
nextEmptyColumn.Offset(1).AutoFill Range()
I keep getting errors when I try to do range. Any know how to autofill from the second row in the column to the last row with data in the adjacent column.
Dim nextEmptyColumn As Range
Set nextEmptyColumn = Worksheets("Sheet1").Range("A1").End(xlToRight).Offset(0, 1)
nextEmptyColumn.Value = "AlertKey"
nextEmptyColumn.Offset(1).Formula = "=(MID(Sheet1!D2,FIND(""AlertKey:"",Sheet1!D2)+LEN(""AlertKey:""),FIND(""AlertGroup"",Sheet1!D2)-FIND(""AlertKey:"",Sheet1!D2)-LEN(""AlertKey:"")))"
nextEmptyColumn.Offset(1).AutoFill Range()
I keep getting errors when I try to do range. Any know how to autofill from the second row in the column to the last row with data in the adjacent column.