LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default cell.replace strange behaviour

Hi all,

Sub remplacement()
Sheets("Sheet2").Select
Cells.Replace What:="=", replacement:="=", LookAt:=xlPart,
SearchOrder _
:=xlByRows, MatchCase:=False
Sheets("Sheet3").Select
Cells.Replace What:="=", replacement:="=", LookAt:=xlPart,
SearchOrder _
:=xlByRows, MatchCase:=False
End Sub

I've recorded this macro to avoid hitting enter each time when I copy a
formula located in a cell in text format into a new cell (not in text
format).

When I run this macro it works fine with a formula like "=x+5" or
"=len()" but not with a formula like "=vlookup()" I have an error 1004
message saying that "replace method of range class failed".

The amazing thing is that when I have recorded this macro, it worked
fine with the =vlookup() and also worked fine when I've used the find
and replace ????

Any idea to solve it ?

Tx

Nic.

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
find and replace macro strange behaviour Nicawette Excel Discussion (Misc queries) 3 June 13th 06 08:49 PM
Strange VBA Behaviour Ricko Excel Programming 0 July 28th 05 07:53 AM
Strange Cell Behaviour...? Darin Kramer Excel Programming 3 June 27th 05 12:37 PM
Strange behaviour Edgar Thoemmes Excel Worksheet Functions 1 February 8th 05 03:20 PM
Strange behaviour in VBA Help Michael Singmin Excel Programming 4 June 4th 04 07:06 PM


All times are GMT +1. The time now is 06:41 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"