Mawar5530
04-06-2020, 10:12 PM
Columns("H:H").Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Rows("1:1").Select
Selection.AutoFilter
ActiveSheet.Range("A:AT").AutoFilter Field:=4, Criteria1:=Array( _
"POitem", "PurRqs", "ShpgNt"), Operator:=xlFilterValues
Range("F2:F" & Range("F" & Rows.Count).End(xlUp).Row).SpecialCells(12).Value = 0
Range("H2:H" & Range("H" & Rows.Count).End(xlUp).Row).SpecialCells(12).Formula = "=IF(F2=0, ABS(F2-G2),F2-G2)" (not working)
Selection.Copy
Selection.AutoFilter
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Rows("1:1").Select
Selection.AutoFilter
ActiveSheet.Range("A:AT").AutoFilter Field:=4, Criteria1:=Array( _
"POitem", "PurRqs", "ShpgNt"), Operator:=xlFilterValues
Range("F2:F" & Range("F" & Rows.Count).End(xlUp).Row).SpecialCells(12).Value = 0
Range("H2:H" & Range("H" & Rows.Count).End(xlUp).Row).SpecialCells(12).Formula = "=IF(F2=0, ABS(F2-G2),F2-G2)" (not working)
Selection.Copy
Selection.AutoFilter