View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
scott d scott d is offline
external usenet poster
 
Posts: 5
Default dividing an replacing spaces in string

It was to show that the data is never consistent based upon the whim
of the data entry person. I have had all kinds of weird things thrown
in the cells.
I was working along the lines of exactly what you had here Jason but
regular expression ended up being a shorter bit of code for me to not
get as lost in.
Thanks for the help.
scott

On 25 Jan 2007 05:45:43 -0800, "Jason Lepack"
wrote:

Also, what happened to Yellow?
On Jan 25, 5:47 am, scott d <please no email wrote:
You guys always steer me right.

How can I do this?
I am showing spaces as ~
Everything is in a single cell.
I don't need to do anything with the small groups of spaces 1-3 are
ok.
I need a Line break replacing the larger qtys. However they always
vary in length.

2.31~QN~C/AS4~GAW~~~~~~~~~1.03~FW~YELLOW~~J/VVS13~~NEA~~~~~~~~~~~~40.04~HP~*F/VVS2~~~MHA
~~~~~~~~~~~~~~~~~~111.51~AD~D/SI~ EMO~~~~~~~~~~~1.20~MX~L/TS~ GHL~

So generally I need, when there is a large span of spaces to convert
each group to a vbLf.

This newly delimited string will dump into separate rows like this

2.31 QN C/AS4 GAW
1.03 FW J/VVS13 NEA
40.04 HP F/VVS2 MHA
111.51 AD D/SI EMO
1.20 MX L/TS GHL

Any ideas?
Thanks as always
scott