Hi, Il lunedì 11 febbraio 2008 20:12:48 Jonathan Kaye ha scritto: > Steffen Grund wrote: > > Hello, > > > > I am not the Basic expert here, but wouldn't something like this work? > > > > While Position <> <exit_value> > > Position = Instr(i, ProcessString, " ") > > etc. etc. etc. > > Wend > > > > and just initialize Position before, so it does not have the exit value? > > Hi Steffen, > In fact, no it wouldn't. I'm processing entries in a spreadsheet which may > have an arbitrary number of spaces in them. The entries also contain > numbers. The idea is that all the numbers within a given chunk have to wind > up at the end of the chunk next to a following space or EOL. So the exit > condition would be when there are no more spaces left in the entry. I do > this by successively shrinking the value of ProcessString with each loop.
I'm not sure to understand what you're trying to archieve. May you provide an example of the kind of data that you expect as input and the correspondig output that you would obtain from the function ? > The actual code I wrote looks like this: > Function cutspace(ProcessString) as String [...] > Lft = Lft + movetones(Chunk) + " " What is "movetones" ? ciao Paolo M --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]