Edit & Replace "=@" causing Run-time Error 1004: Application-defined or object-defined Error

Mike UK

New Member
Joined
Dec 14, 2011
Messages
43
Hi,
I have a column of data in which some cells contain =@SIPP LIMITED. The coding below goes through the column and replaces the =@SIPP LIMITED with AT SIPP LIMITED.
Two of us have tried the coding on two different machines and the VBA Code works as stated. However, on one persons machine they get the Run-time Error 1004: Application-defined or object-defined Error.

I am assuming they have a setting which is different or their excel needs reinstalling? Can anyone shed any light on why it works for two of our machines but not the third person's machine?
Here is the code...

Columns("B:B").Select
Selection.Replace What:="=@SIPP", Replacement:="AT SIPP", LookAt:=xlPart _
, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False, FormulaVersion:=xlReplaceFormula2

Many thanks
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Are all three machines running 365 & do they all have the dynamic array functions such as Filter & Sequence?
 
Upvote 0
In my case i was searching for values(not formula) in cells and replacing them,
But in my replace parameters, this one threw the 'application defined or object defined error'
```
FormulaVersion:=xlReplaceFormula2
```
i removed it and it worked.
 
Upvote 0
In my case i was searching for values(not formula) in cells and replacing them,
But in my replace parameters, this one threw the 'application defined or object defined error'
```
FormulaVersion:=xlReplaceFormula2
```
i removed it and it worked.
Excellent *mahin101
Many thanks for the explanation and resolution.
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

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