LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Address & Name maniplations

One way which might do it ..

Assuming data in cols A and B, from row1 down

In C1:
=IF(SUMPRODUCT(--ISNUMBER(SEARCH({"Surname";"First Name";"Home
Number"},A1)))0,TRIM(MID(A1,SEARCH(":",A1)+1,99)) ,"")

In D1:
=IF(AND(C1<"",C2<""),C2&" "&C1,"")

In E1:
=IF(ISNUMBER(SEARCH("Email",B1)),TRIM(MID(B1,SEARC H(":",B1)+1,99)),"")

In F1:
=IF(D1="","",ROW())

In G1:
=INDEX(D:D,SMALL(F:F,ROW()))

In H1:
=IF(ISNUMBER(C1+0),ROW(),"")

In I1:
=INDEX(C:C,SMALL(H:H,ROW()))

In J1:
=IF(E1="","",ROW())

In K1:
=INDEX(E:E,SMALL(J:J,ROW()))

Finally, in L1:
=IF(G1="","",G1&"#"&I1&"#"&K1)

Then just select C1:L1, copy down to the last row of source data in col A.
Col L should return the required results bunched at the top (till #NUM!
appears). Tested ok on your sample data as posted.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Lamb Chop" wrote in message
...
I have a list of the contact list exported from a software which I have no
control of what it generate.

For example,

Column A Column B
Surname: Smith Title: Prof
First Name: John Email:
Address: Virtual Street
State: Victoria
Postcode: 1299
Home Number: 123456
Fax: 456789
Mobile: 98765
<empty row.
Surname: Peters Occupation: Teacher
First Name: Davis Email:

Address: Virtual Street
Home Number: 99999
Mobile: 98765
<Empty row
<another record starts
...
...
..
etc...


I need to put the name, Home nuimber and emails into a single column and
separate the fields by #, e.g.

John
Davis
...
..
...


The trick of the data is that the lenght of the records are not the same,
e.g. some missed the Fax number, some missed the address. Therefore,
some
records occupy 5 rows and some with 6 or 7 rows. Some use 2 columns,
while
some use only 1 column. (never more than two columns).
Between each record there is a empty row to separate them.

All the field started with some key words, e.g. "Surname:", "First
Name:",
"email:" etc

Any suggestion?

Thanks in advance.








 
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 can i convert an email address to a web address Arvind Sikar Excel Worksheet Functions 3 October 3rd 06 08:06 PM
Excel email address hyperlink does not update Michael Excel Discussion (Misc queries) 1 August 2nd 05 02:36 PM
How do I move excel address lists to outlook. and vice versa. Lost in Office Excel Discussion (Misc queries) 1 April 9th 05 04:35 PM
How do I find the contents of a cell using the "ADDRESS" function. sweeney Excel Worksheet Functions 2 April 5th 05 03:23 AM
How can I get an address in one cel and vertical? Joffrey Excel Discussion (Misc queries) 1 March 14th 05 02:01 PM


All times are GMT +1. The time now is 08:33 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"