kuldeepjainesl
Member
Hello All,
i recorded a macro and it is working fine on my Laptop but this code gives error on all other PCs in its last raw where a sum if formula is placed.
i recorded a macro and it is working fine on my Laptop but this code gives error on all other PCs in its last raw where a sum if formula is placed.
Code:
Sub Macro1()
'
' Macro1 Macro
'
'
Range("Table1[[#Headers],[Branch]]").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Sheets("Sheet1").Select
Range("A1").Select
ActiveSheet.Paste
Application.CutCopyMode = False
ActiveSheet.Range("Table13[#All]").RemoveDuplicates Columns:=Array(6, 7, 21), _
Header:=xlYes
Range("Table13[[#Headers],[Branch]]").Select
Selection.End(xlToRight).Select
Range("BA1").Select
ActiveCell.FormulaR1C1 = "Qty"
Range("BA2").Select
ActiveCell.FormulaR1C1 = _
"=SUMIFS(C[-37],Order_Report_03!C[-47],""=""&[@Customer],Order_Report_03!C[-46],""=""&[@[Cust.Ord No.]],Order_Report_03!C[-32],""=""&[@[Unit Rate]])"
Range("BA3").Select
End Sub
Last edited: