PDA

View Full Version : Solved: Parsing a field



robsimons
08-20-2008, 08:06 AM
I'm looking for a macro/vba help/code that does the following:
1. Parses a field call in "Predecessor" separating at commas (",")
2. Look up the specific number in another (ID) column
3. And return a field for the corresponding row
4. then Concatenate all these value into a different text columns

so basically and example:

Predecessor column looks like: 566, 234, 255SS
corresponding customized field has values (for these individual tasks): MCM100; AA0001; GHJ1234 --> these are hand input and are have no rhyme or reason.
So I'm looking for the final output to be MCM100, AA0001, GHJ1234SS

Any idea how to do this?

Mavyak
08-20-2008, 10:28 AM
Enjoy!

robsimons
08-23-2008, 06:09 AM
Thank you so much that piece of code saved mu life...

mdmackillop
08-24-2008, 07:01 AM
One minor point, reset MyValues to Null before processing the next cell

c.Offset(0, 1) = Left(MyValues, Len(MyValues) - 1)
MyValues = ""
Next c

robsimons
08-24-2008, 08:37 AM
Thanks I was able to figure that out too. I was really looking for a starting point and that what I got. thanks so much!!!! I love this site and you guys rock for the help you give...