Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
J J is offline
external usenet poster
 
Posts: 7
Default Find a string in excel

Hi,

I have a txt list that looks likes this:

Name: Dave Foo
Address: 80 address street
Phone: &#
Weight: 190
Height: 6


Name: Blab Boing
Address: 320 Sycamore
Phone: &#
Weight: 300
Height: 4


This is repeated for each person and list is 1000 entries long, let's
say.
I'd like to remove everything in the list except for the address. Or
find the address and paste it onto another worksheet, or save it as
txt. I just need to isolate the address.
Not sure how to do that.

Thanks for any help
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Find a string in excel

Try something like the following


Sub CopyAddr()
Dim DestRng As Range
Dim RowNdx As Long

'change SkipRows to number of rows between
' address lines
Const SkipRows = 7
' change RowNdx to first address row
RowNdx = 5
' change DestRng to location to which
' addresses should be copied
Set DestRng = Worksheets(2).Range("A1")

Do Until Worksheets(1).Cells(RowNdx, "A") = ""
DestRng = Worksheets(1).Cells(RowNdx, "A")
Set DestRng = DestRng(2, 1)
RowNdx = RowNdx + SkipRows
Loop
End Sub



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
www.cpearson.com



"J" wrote in message
om...
Hi,

I have a txt list that looks likes this:

Name: Dave Foo
Address: 80 address street
Phone: &#
Weight: 190
Height: 6


Name: Blab Boing
Address: 320 Sycamore
Phone: &#
Weight: 300
Height: 4


This is repeated for each person and list is 1000 entries long, let's
say.
I'd like to remove everything in the list except for the address. Or
find the address and paste it onto another worksheet, or save it as
txt. I just need to isolate the address.
Not sure how to do that.

Thanks for any help



  #3   Report Post  
Posted to microsoft.public.excel.programming
J J is offline
external usenet poster
 
Posts: 7
Default Find a string in excel (Thanks)

Thanks guys, appreciate the help.
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
how we find specific word from string in excel and compaire it. Vishnu Excel Worksheet Functions 2 April 18th 09 07:51 AM
Find String in another string - only between spaces Nir Excel Worksheet Functions 9 November 2nd 06 11:31 AM
Find Many String options in ONE String Nir Excel Worksheet Functions 6 October 26th 06 07:13 AM
Excel -find records which DO NOT contain a particular text string JackBuff Excel Discussion (Misc queries) 5 May 23rd 06 05:40 PM
Excel - Find & Replace text in a string bklim Excel Worksheet Functions 1 June 14th 05 06:42 AM


All times are GMT +1. The time now is 09:35 AM.

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"