Hi All,
Can you please help me by adjusting this VBA for autofill until empty for the following ranges?
Thank you very much!!!
P.S.
See VBA.
-----------------------------------------------------------------------------------------------
Sub Item_Stock()
'
' Item_Stock Macro
'
' Keyboard Shortcut: Ctrl+y
'
Application.CutCopyMode = False
With Selection
.WrapText = False
.Orientation = 0
.AddIndent = False
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Rows("1:2").Select
Selection.Delete Shift:=xlUp
Columns("A:A").Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Range("B1").Select
Selection.Copy
Range("A1").Select
ActiveSheet.Paste
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "Date"
Columns("B:N").Select
Selection.AutoFilter
ActiveSheet.Range("$B$1:$N$115326").AutoFilter Field:=3, Criteria1:="=NO", _
Operator:=xlOr, Criteria2:="="
ActiveSheet.Range("$B$1:$N$115326").AutoFilter Field:=5, Criteria1:="AMS"
Range("B1").Select
Selection.AutoFilter
Range("A2").Select
ActiveCell.FormulaR1C1 = "5/23/2018"
Range("A2").Select
Selection.NumberFormat = "[$-en-US]d-mmm-yy;@"
Selection.AutoFill Destination:=Range("A2:A115324")
Range("A2:A115324").Select
Selection.AutoFill Destination:=Range("A2:A115324"), Type:=xlFillCopy
Range("A2:A115324").Select
Columns("A:N").Select
Selection.AutoFilter
ActiveSheet.Range("$A$1:$N$115326").AutoFilter Field:=4, Criteria1:="=NO", _
Operator:=xlOr, Criteria2:="="
ActiveSheet.Range("$A$1:$N$115326").AutoFilter Field:=6, Criteria1:="AMS"
Range("B1").Select
ActiveWindow.SmallScroll Down:=-3
End Sub
Can you please help me by adjusting this VBA for autofill until empty for the following ranges?
- ActiveSheet.Range("$B$1:$N$115326")
- Selection.AutoFill Destination:=Range("A2:A115324")
Thank you very much!!!
P.S.
See VBA.
-----------------------------------------------------------------------------------------------
Sub Item_Stock()
'
' Item_Stock Macro
'
' Keyboard Shortcut: Ctrl+y
'
Application.CutCopyMode = False
With Selection
.WrapText = False
.Orientation = 0
.AddIndent = False
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Rows("1:2").Select
Selection.Delete Shift:=xlUp
Columns("A:A").Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Range("B1").Select
Selection.Copy
Range("A1").Select
ActiveSheet.Paste
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "Date"
Columns("B:N").Select
Selection.AutoFilter
ActiveSheet.Range("$B$1:$N$115326").AutoFilter Field:=3, Criteria1:="=NO", _
Operator:=xlOr, Criteria2:="="
ActiveSheet.Range("$B$1:$N$115326").AutoFilter Field:=5, Criteria1:="AMS"
Range("B1").Select
Selection.AutoFilter
Range("A2").Select
ActiveCell.FormulaR1C1 = "5/23/2018"
Range("A2").Select
Selection.NumberFormat = "[$-en-US]d-mmm-yy;@"
Selection.AutoFill Destination:=Range("A2:A115324")
Range("A2:A115324").Select
Selection.AutoFill Destination:=Range("A2:A115324"), Type:=xlFillCopy
Range("A2:A115324").Select
Columns("A:N").Select
Selection.AutoFilter
ActiveSheet.Range("$A$1:$N$115326").AutoFilter Field:=4, Criteria1:="=NO", _
Operator:=xlOr, Criteria2:="="
ActiveSheet.Range("$A$1:$N$115326").AutoFilter Field:=6, Criteria1:="AMS"
Range("B1").Select
ActiveWindow.SmallScroll Down:=-3
End Sub