Multiple Loop for Reading a text file with tags

newbie001

New Member
Joined
Mar 25, 2014
Messages
9
Hi Sirs,

I have a problem regarding sorting our books on our store. The database extracted in textfile is somehat like this
<bookstart
<bookstart
<bookstart
**BOOKSTART
SERIAL=3234123532;
AUTHORSN=12343234;
CASE=11;
CLASS=1-1-101-241-33-NONE-0-NONE-00000000-65535-0-0-DP_UPS-NONE;
CLASS=2-9-1-241-33-NONE-0-NONE-00000000-65535-0-0-DP_UPS-NONE;
CLASS=3-4-1-241-33-NONE-0-NONE-00000000-65535-0-0-DP_UPS-NONE;
CLASS=4-7-101-241-33-NONE-0-NONE-00000000-65535-0-0-DP_UPS-NONE;
CLASS=5-3-1-241-33-NONE-0-NONE-00000000-65535-0-0-DP_UPS-NONE;
<bookend
**BOOKEND
<bookstart< em="">**BOOKSTART
<bookend
<bookend
<bookstart
SERIAL=3234123533;
AUTHORSN=12343234;
CASE=11;
CLASS=1-1-101-241-33-NONE-0-NONE-00000000-65535-0-0-DP_UPS-NONE;
CLASS=2-9-1-241-33-NONE-0-NONE-00000000-65535-0-0-DP_UPS-NONE;
CLASS=5-4-1-241-33-NONE-0-NONE-00000000-65535-0-0-DP_UPS-NONE;
CLASS=4-7-101-241-33-NONE-0-NONE-00000000-65535-0-0-DP_UPS-NONE;
CLASS=8-3-1-241-33-NONE-0-NONE-00000000-65535-0-0-DP_UPS-NONE;
<bookend< em="">**BOOKEND
<bookend
</bookend
</bookend<>
</bookstart
</bookend
</bookend
</bookstart<>
</bookend
</bookstart
</bookstart
</bookstart
I want to tabulate all the book on excel but i don't know how to do it via VBA. I just want to get the first two columns on the CLASS tag. The First Column of the CLASS tag is the BOOK LOCATION, and the Second Column is the Storage Location


I want to match the BOOKLOCATION Number to the Storage Location like the one on the table below. I have thousand of records. i want to sort. I hope you can help me on my dilemma. =(
SERIAL
AUTHOR
CASE
1
2
3
4
5
6
7
8
9
3234123532
12343234
11
1
5
3
4
2
3234123533
12343234
11
1
8
5
4
2

<tbody>
</tbody>
 

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.
This linecode is highlighted in yellow

Class(ClassLoc(1)) = ClassLoc(0)
This may be difficult to debug without being abel to see the file directly, but I'll try. Do you have any lines in the file that either have "CLASS=" (without the quotes, of course) on a line by itself or that has text with either zero or only one dash in the text that follows "CLASS="? I'm not entirely sure where to tell you to look because it depends on which variable was equal to 28786 when the error occurred (you had said "and after 28,786 it has a error" in Message #8), but obviously it would be somewhere deep in the text file. By the way, how big (in Megs) is that text file?
 
Upvote 0
Do you have any lines in the file that either have "CLASS=" (without the quotes, of course) on a line by itself
None sir.
or that has text with either zero or only one dash in the text that follows "CLASS="?
None Sir.

this is where is stopped, It just get the Serial and Case. After that it did not put the class data.

**BOOKSTART
SERIAL=9372745271;
CASE=11;
CLASS=8-7-101-241-33-NONE-0-NONE-00000000-65535-0-0-DP_UPS-NONE;
CLASS=3-3-1-241-33-NONE-0-NONE-00000000-65535-0-0-DP_UPS-NONE;
CLASS=45-9-1-241-33-NONE-0-NONE-00000000-65535-0-0-DP_UPS-NONE;
**BOOKEND
 
Upvote 0

Forum statistics

Threads
1,215,853
Messages
6,127,328
Members
449,376
Latest member
karenmccabe

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