Sorting lines in a cell into columns of data

frustin

New Member
Joined
Jan 24, 2005
Messages
4
My cells are vcards which i'm trying to split out into separated columns (transpose): Name, Organisation, Title, Telephone, Address, Email, Notes

example of cell A1 content (A2, A3, An+1 have the same data types):

BEGIN:VCARD
N:Joe Bloggs
ORG:Microstaff
TITLE:IT executive
TEL:0234522555
ADR:;;48 rue de Tomato;75032;;Paris;France
EMAIL:joe.bloggs@microstaff.com
NOTE:Contact from Cool Event London 2014
END:VCARD

As you can see the delimiters are a bit odd (especially the address field), i've imported this from an iPhone app called QRReader, but it didnt port to CSV very well.

I've tried all sorts of ways such as: =IF(SEARCH("N:",A2),SUBSTITUTE(A2,"N:",""),"") for the name field and so on but this does not work very well because it pulls in all the stuff after "bloggs".

Any help appreciated thanks.
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
No, all the info you see there is sitting in one cell at the moment. I'd like to transpose the cells out into separate columns with the headers: Name, Organisation, Title, Telephone, Address, Email, Notes.
 
Upvote 0
Not really a fix but this is what i did in the end:

find/replace "BEGIN:VCARD" and "END:VCARD" with ;
find/replace everything that ends with a : with a ; e.g. N: and TITLE:
=SUBSTITUTE(A1, Char(13), "") this removes all the line breaks/returns (i'm using Mac Excel 2011. In Windows i'd have used find/replace ctrl-J).
Now everything is semi-colon delimited. I then used text-to-column to put everything in columns.
 
Upvote 0

Forum statistics

Threads
1,216,030
Messages
6,128,413
Members
449,449
Latest member
Quiet_Nectarine_

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top