OZONE Asylum
Forums
OZONE
Excel Coding
This page's ID:
31079
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
In Excel, I have a list like this: [ulist] [b]London[/b] * The capital of England. The Prime Minister Lives there. * It rains a lot more than most towns. [b]Berlin[/b] * The capital of Germany. * It used to be divided into 2 parts. There was a wall through the middle. * Kennedy visited it once. [/ulist] I want to turn it into a list like this: [code]The capital of England. The Prime Minister Lives there. It rains a lot more than most towns. | London The capital of Germany. It used to be divided into 2 parts. There was a wall through the middle. Kennedy visited it once. | Germany[/code] Where the city names are in the second column and the descriptions are concatenated into the cell to the left of them. I've been trying to figure out how to do this in Excel code, but I've made nothing but messes. Notably, I don't know how to specify where one block of the list ends and the next begins. This is something I need to use on my work machine, so I don't have many coding/compilation resources available to me, only VBA. The former list is generated by someone else, and with the latter list I can begin to build a sort of tracker. I figured out how to make Excel run a macro with some code, and I have an idea of the algorithm that I want to run: 10 IF the cell before this one was blank THEN move this cell to the cell to its right 20 DELETE the cell, moving every cell below it up by one 30 CONCATENATE every cell until the next empty cell into this cell 40 FIND the next cell with a blank cell above it 50 GOTO 10 I'm lost on how to code it. I've reading stuff like this: [url=http://www.mvps.org/dmcritchie/excel/strings.htm]My Excel Pages - Strings and Manipulations[/url], but anything deeper than replacing one cell with another has me stumped. Does anyone have any good references or snippets I can look at? Has anyone seen anything similar to this done? [small](Edited by [url=http://www.ozoneasylum.com/user/418]Petskull[/url] on 06-28-2009 01:19)[/small]
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »