Simple replace command

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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)
 
I did not understand why. But it worked. Could you explain again? What is
colon?
Thanks,
Daniel
 
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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top