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

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
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 "@".
 
Upvote 0
Solution
Does your "like" mean that it helped you solve the issue?
If so, was it an older version of Excel?
 
Upvote 0
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!
 
Upvote 0
Sounds good.
Thanks
 
Upvote 0
We both have Excel 2016. Any ideas of what else could it be?
 
Upvote 0
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.
 
Upvote 0
Issue has been solved. The person didn't have the latest version of office apps.
 
Upvote 0
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
 
Upvote 0
Thanks for responding back!
:)
 
Upvote 0

Forum statistics

Threads
1,213,546
Messages
6,114,251
Members
448,556
Latest member
peterhess2002

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
Back
Top