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

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
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,635
Messages
6,125,942
Members
449,275
Latest member
jacob_mcbride

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