Reorder String

M

msnyc07

I tried to re-process strings in a VBA script that parsed some cells to no
avail.

So I am looking for a function that will do so.

Essentially the VBA created concatenations on nested data so I ended up with
the following as the content of any SINGLE Cell (i.e. the | does not mean
'Next Field' it is a character)

Value A
Value A | Value B
Value A | Value B | Value C
Value A | Value B | Value C | Value D

That is correct except when the value is Level AnyNumber, then I want to
swap that with the prior value so

Value A
Level 1 | Value A
Level 1 | Value A | Value C
Level 1 | Value A | Value C | Value D

I suppose in some cases it might be

Value A
Value A | Value B
Value A | Level 1 | Value B
Value A | Level 1 | Value B | Value D

But the point is still the same
Find Level X | *
Swap for
* | Level X

Is that do-able?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top