Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default Simple replace command

I have a macro that deals with 9 different files one by one.
I have 2 columns in each file that should have its formulas' references
adapted depending on the file I am treating.

I used the replace comand, but it's not working. I tried several times and
several ways... I just wanted to replace "$16;" by "$17;", "$18;",... etc
which are filed in the variable substitution.

If one has a tip... Thanks in advance,

Daniel (Brazil)

myUnion.Select

myUnion.Replace What:="$16;", Replacement:=Substitution, LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Simple replace command

Daniel,

Shouldn't it be $16: that is colon not semi-colon?

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"dspilberg" wrote in message
...
I have a macro that deals with 9 different files one by one.
I have 2 columns in each file that should have its formulas' references
adapted depending on the file I am treating.

I used the replace comand, but it's not working. I tried several times and
several ways... I just wanted to replace "$16;" by "$17;", "$18;",... etc
which are filed in the variable substitution.

If one has a tip... Thanks in advance,

Daniel (Brazil)

myUnion.Select

myUnion.Replace What:="$16;", Replacement:=Substitution,
LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default Simple replace command

I did not understand why. But it worked. Could you explain again? What is
colon?
Thanks,
Daniel

"Bob Phillips" wrote:

Daniel,

Shouldn't it be $16: that is colon not semi-colon?

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"dspilberg" wrote in message
...
I have a macro that deals with 9 different files one by one.
I have 2 columns in each file that should have its formulas' references
adapted depending on the file I am treating.

I used the replace comand, but it's not working. I tried several times and
several ways... I just wanted to replace "$16;" by "$17;", "$18;",... etc
which are filed in the variable substitution.

If one has a tip... Thanks in advance,

Daniel (Brazil)

myUnion.Select

myUnion.Replace What:="$16;", Replacement:=Substitution,
LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Simple replace command

I think it is because you are trying to change a cell reference, and these
are separated by colon, not semi-colon.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"dspilberg" wrote in message
...
I did not understand why. But it worked. Could you explain again? What is
colon?
Thanks,
Daniel

"Bob Phillips" wrote:

Daniel,

Shouldn't it be $16: that is colon not semi-colon?

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my
addy)

"dspilberg" wrote in message
...
I have a macro that deals with 9 different files one by one.
I have 2 columns in each file that should have its formulas' references
adapted depending on the file I am treating.

I used the replace comand, but it's not working. I tried several times
and
several ways... I just wanted to replace "$16;" by "$17;", "$18;",...
etc
which are filed in the variable substitution.

If one has a tip... Thanks in advance,

Daniel (Brazil)

myUnion.Select

myUnion.Replace What:="$16;", Replacement:=Substitution,
LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False






Reply
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
Simple question on With command teepee[_3_] Excel Discussion (Misc queries) 2 December 26th 08 06:27 PM
Simple Find and Replace Question Elessvie New Users to Excel 9 April 22nd 08 05:21 PM
Simple Find/Replace Question Dan R. Excel Programming 4 February 19th 07 11:19 PM
replace cut command Jeff Higgins Excel Programming 0 February 1st 05 01:35 AM
replace command Jean-Francois Excel Discussion (Misc queries) 2 January 11th 05 04:43 PM


All times are GMT +1. The time now is 06:21 PM.

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"