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:

Some videos you may like

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.

excelnube

Board Regular
Joined
Jul 14, 2011
Messages
65
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..>
 

Watch MrExcel Video

Forum statistics

Threads
1,122,809
Messages
5,598,202
Members
414,218
Latest member
speedbit

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
Top