One user experiencing Run-time error 1004 in macro

Panda

New Member
Joined
Feb 19, 2021
Messages
5
Office Version
  1. 365
Platform
  1. Windows
Hi!
One of my macros works well when the users run it, except for one. That user gets Run-time error 1004 and this is where it highlights when clicking debug:

Range("CZ2:CZ" & OpenOrdersRows).FormulaR1C1 = "=IF(OR(NOT(ISERROR(MATCH(@C36,Mapping!C4,0))),@C2="""",ISERROR(MATCH(VALUE(@C46),Mapping!C3,0)),NOT(ISERROR(MATCH(VALUE(@C50:C[-54]),Mapping!C32,0)))),""Delete"",""Keep"")"

Do you think is because I am using @C36 instead of the range? Thank you in advance!


The complete code (up to where the error is):

Sub Update_Outbounds()

Sheets("Control").Select

'Count Open Orders rows
OpenOrdersRows = Sheets("Open_Orders").Range("A1").Offset(Rows.Count - 1, 0).End(xlUp).Row

'Stop the macro if Open Orders is empty
If OpenOrdersRows = 1 Then
MsgBox "The Open Orders sheet is empty. Please update this and re-run this macro"
Exit Sub
Else
End If

'Update button
ActiveSheet.Shapes("Button 4").Select
Selection.Characters.Text = "Update Outbound Delivery Numbers " & Chr(10) & Now

'Remove any filters in the Open_Orders tab
Sheets("Open_Orders").Select
ActiveSheet.AutoFilterMode = False

'Determine which rows should be deleted e.g. not shipping from UK, doesn't have an outboud number or isn't an EU market
Range("CZ1").FormulaR1C1 = "Delete?"
Range("CZ2:CZ" & OpenOrdersRows).FormulaR1C1 = "=IF(OR(NOT(ISERROR(MATCH(@C36,Mapping!C4,0))),@C2="""",ISERROR(MATCH(VALUE(@C46),Mapping!C3,0)),NOT(ISERROR(MATCH(VALUE(@C50:C[-54]),Mapping!C32,0)))),""Delete"",""Keep"")"
Range("CZ2:CZ" & OpenOrdersRows) = Range("CZ2:CZ" & OpenOrdersRows).Value
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
56,957
Office Version
  1. 365
Platform
  1. Windows
Welcome to the Board!

Is this other user using the same version of Excel and Windows as you?
Older versions may have issues with the "@".
 
Solution

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
56,957
Office Version
  1. 365
Platform
  1. Windows
Does your "like" mean that it helped you solve the issue?
If so, was it an older version of Excel?
 

Panda

New Member
Joined
Feb 19, 2021
Messages
5
Office Version
  1. 365
Platform
  1. Windows
I have asked the question to the user and I am waiting for the reply. I'll give you feedback once I have more info. Thanks for the help so far!
 

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
56,957
Office Version
  1. 365
Platform
  1. Windows

ADVERTISEMENT

Sounds good.
Thanks
 

Panda

New Member
Joined
Feb 19, 2021
Messages
5
Office Version
  1. 365
Platform
  1. Windows
We both have Excel 2016. Any ideas of what else could it be?
 

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
56,957
Office Version
  1. 365
Platform
  1. Windows

ADVERTISEMENT

Not sure.
Is that person running it on the exact same file as you?
Is anything outside of this Excel file being linked in to it (links to other Excel files, hyperlinks to the web, etc)?

Here is an interesting conversation regarding the "@" symbol, and whether or not you might be able to review it. Don't know if it will help at all, but might be worth a read.
 

Panda

New Member
Joined
Feb 19, 2021
Messages
5
Office Version
  1. 365
Platform
  1. Windows
Issue has been solved. The person didn't have the latest version of office apps.
 

Panda

New Member
Joined
Feb 19, 2021
Messages
5
Office Version
  1. 365
Platform
  1. Windows
Not sure.
Is that person running it on the exact same file as you?
Is anything outside of this Excel file being linked in to it (links to other Excel files, hyperlinks to the web, etc)?

Here is an interesting conversation regarding the "@" symbol, and whether or not you might be able to review it. Don't know if it will help at all, but might be worth a read.
Issue has been solved. The person didn't have the latest version of office apps. Thanks
 

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
56,957
Office Version
  1. 365
Platform
  1. Windows
Thanks for responding back!
:)
 

Watch MrExcel Video

Forum statistics

Threads
1,129,816
Messages
5,638,496
Members
417,029
Latest member
lingx86

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top