L
Lost in Excel
I am working to create a Macro that will look at a specific column and fill
down a formula. The Macro is working properly to identify the column, but it
is not working properly at the end due to an error. My formula is
Bottom = [D9].End(xlDown).Row
Range("A9").Select
Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select
Selection.Sort Key1:=Range("D9"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Selection.NumberFormat = "General"
Range("D9").Select
Selection.AutoFill Destination:=Range("D9 & Bottom").Select (ERROR
HERE)
Range("D9" & Bottom).Select
ActiveCell.FormulaR1C1 = "=RC[3]-RC[1]"
The error is indicated above. Does anyone know why this formula won't fill
down the column? I only need it is fill in where there is data. Thanks!
down a formula. The Macro is working properly to identify the column, but it
is not working properly at the end due to an error. My formula is
Bottom = [D9].End(xlDown).Row
Range("A9").Select
Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select
Selection.Sort Key1:=Range("D9"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Selection.NumberFormat = "General"
Range("D9").Select
Selection.AutoFill Destination:=Range("D9 & Bottom").Select (ERROR
HERE)
Range("D9" & Bottom).Select
ActiveCell.FormulaR1C1 = "=RC[3]-RC[1]"
The error is indicated above. Does anyone know why this formula won't fill
down the column? I only need it is fill in where there is data. Thanks!