Macro to read<> and </> in rows an produce CSV file

excelnube

Board Regular
Joined
Jul 14, 2011
Messages
65
Hi,

Im trying to create a macro that loops through a number of rows in my spreadsheet (nearly 300).. Reads each rows data, eg:

<..Input..><..Applicant..><..ApplicantIdentifier..>1<../ApplicantIdentifie..r><..Name..><..Title..>MISS<../Title..><..Forename..>ANDREW<../Forename><..MiddleName..>Test<../MiddleName..><..Surname..>RIBENA<../Surname..><../Name...><..Gender..>F<../Gender..><..DateOfBirth..><..CCYY..>1988<../CCYY..><..MM..>1<../MM..><..DD..>26<../DD..><../DateOfBirth..><..FormattedName..>MISSANDREWRIBENA<../FormattedNam..e><../Input..><applicant><applicant><applicant><applicant><applicant>

Minus the .. in the < > i had to add the .. so it would show in this post

Picks out the values between the elements, and produces a CSV file with the values, for example:

1,MISS,ANDREW,TEST,RIBENA,F,1988,1,26,MISSANDREWRIBENA

Any help would be appreciated.

Thanks</applicant></applicant></applicant></applicant></applicant>
 
Last edited:

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Re: Macro to read parse rows an produce CSV file

Not sure why my example row is displayed like that, each element is as per:

<...NAME..>
 
Upvote 0

Forum statistics

Threads
1,215,066
Messages
6,122,948
Members
449,095
Latest member
nmaske

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