Replacing Contents in Cells

T

Tangier

Within my module, I would like to replace the word

Cells.Replace What:="0", Replacement:="No Spouse",
LookAt:=xlPart _
, SearchOrder:=xlByRows, MatchCase:=False,
SearchFormat:=False, _
ReplaceFormat:=False

However when I do this, wherever there is a zero, I see "No Spouse" so
for the number 104, I see 1NoSpouse4

How do I specify only 0, instead of a number that may contain 0. thanx
 
P

Peo Sjoblom

Change this part


LookAt:=xlPart


to this


LookAt:=xlWhole



--


Regards,


Peo Sjoblom
 

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

Top