search and delete unwanted text

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

Guest

can some one help me write a macro or procedure to search for hostname column
should be stripped to read only hostname. there are other hostnames also in
there but they dont have the period. so i want to look for the ones with "."
and delete them

e.g CAIAP06D.nam.nsroot.net becomes CAIAP06D

Your help would be greatful. i dont know anything about writing a macro so
please help me in detail.

thanks in advance
 
select the column,
Do data=>Filter=>Autofilter

this will put a dropdown arrow in the first cell of the column. Click on it
and select custom

select contains and type in

CAIAP06D.

this should make only those rows you are interested in visible.

select all the visible cells in that column. Then do Edit=>goto =>special
and select Visible Cells.

Now go to the formula bar and type in

CAIAP06D

Hit Ctrl+enter instead of enter and it should replace all the values.

Now do Data=>filter=>Autofilter and the filter will be removed.
 
can i write a macro to search for string that contains ".nam.nsroot.net " and
replace it with blank in the whole file.
regards
Irtiza
 
I was under the impression that .name.nsroot.net was variable - so yes, you
could use find and replace as you state or even to look for the whole string
and replace it with the desired string. But since you posted this as if
there was actually a difficult problem to solve, it was easy to imagine all
sorts of complexities. <g>
 
Back
Top