• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Code Error on All PC except mine

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.

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:
Do the other PC's use the same file or a different file?, I assume it's a diferent file

If that is the case there is a chance that Table1 and Table13 may not exist on their PC's

Is there any chance you can post the file here ?
 
Hi Kuldeep ,

One possibility is the Excel version ; the @ nomenclature to designate #This Row is available from Excel 2010 onwards ; for Excel 2007 you need to use [[#This Row], [Customer]] instead of [@Customer].

Narayan
 
Oh Yes, Narayan, All other are 2007 except mine which is 2010. Let me check if this work.

You have "great eye for the detail", Thanks
 
Back
Top