I'm using Windows 7 and excel 2010. I have about 35,000 rows. Most of my data in Column 1 is "marked up" in square brackets, such as [title] or [date]. Then column 2 contains the associated data for that row. So if cell A1 contains [title], then B1 contains "The Cat in the Hat". And if A2 contains [date], then B2 contains "1962" (for example). So I have about 8 of these "headings" in square brackets, and then they repeat for a different item. I'm trying to convert this into a more standard table format with each of the 8 headings having its own column, so that each item can only occupy a single row, instead of how it currently is with each item occupying like 8 rows. I was able to use VB to accomplish this and transfer the contents into a standard table format in another worksheet. However, the problem I'm having is that some of the content in column 2 is broken up by paragraphs and then is sitting in column one. My VB script only looped through column 1 looking for the headings in square brackets. When it finds a heading the script copies the column 2 data in the appropriate place in a new worksheet. But my problem is that I don't know how to get data from column that is not marked up into the appropriate cell. Here is an example of what my data looks like. I only used 2 different headings in this example to keep it short, but my real data has like 8 headings. I appreciate any help tremendously.
<tbody>
</tbody>
here is how I would like the data to finally be in a new worksheet in the same workbook:
<tbody>
</tbody>
[title] | the cat in the hat -book 1 |
[content] | this is the content. but sometimes it spills over into column 1, but not this time. |
[title] | new book PROBLEM - book 2 |
[content] | here is some more content. this time, you can see how |
it goes into column one, | |
even though it belongs to the title "new book PROBLEM" book 2 | |
[title] | huckleberry finn - book 3 |
[content] | the content for book 3 |
<tbody>
</tbody>
here is how I would like the data to finally be in a new worksheet in the same workbook:
the cat in the hat -book 1 | this is the content. but sometimes it spills over into column 1, but not this time. |
new book PROBLEM - book 2 | here is some more content. this time, you can see how it goes into column one, even though it belongs to the title "new book PROBLEM" book 2 |
huckleberry finn - book 3 | the content for book 3 |
<tbody>
</tbody>