Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default search and delete unwanted text

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default search and delete unwanted text

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.

--
Regards,
Tom Ogilvy





"Arain" wrote:

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default search and delete unwanted text

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

"Tom Ogilvy" wrote:

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.

--
Regards,
Tom Ogilvy





"Arain" wrote:

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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default search and delete unwanted text

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

--
Regards,
Tom Ogilvy


"Arain" wrote:

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

"Tom Ogilvy" wrote:

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.

--
Regards,
Tom Ogilvy





"Arain" wrote:

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

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
Delete unwanted sheet Brenda Excel Discussion (Misc queries) 6 October 19th 08 06:13 AM
Delete unwanted data JJ Excel Worksheet Functions 1 February 26th 08 08:14 AM
Search & delete ANY text in select columns huruta Excel Discussion (Misc queries) 2 June 30th 06 07:31 PM
how to delete unwanted sheets N E Body[_17_] Excel Programming 3 November 19th 04 10:22 AM
Delete unwanted rows Ken Wright Excel Programming 1 August 11th 03 11:33 AM


All times are GMT +1. The time now is 01:42 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"