how to find cell?

P

projectside

hi, please help me on this...

I want to find a cell that has a text on it regardless of how it was
written.

the text is: 0 - 30 days and i need to replace it with 30

i went and did a find and replace. However, i tried to find it under:
0-30 days..but it didn't find anything because i am missing the spaces.
(if I do 0 - 30 days, it finds it).

How should I find it no matter how many spaces in between?
 
S

steve

From code: (watch word wrap)

Cells.Find(What:="0*-*30*days", After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False).Activate

from the spread sheet
0*-*30*days

Love those wild cards...
 

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