Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hi, I would like a point in the right direction please.
My number in cell a1 will look similar to this 123/456/789.
It is 3 groups of 3 numbers seperated by '/'.
How do I get each group of 3 numbers as seperate strings?
Also, what is the search command to search an excel workbook for strings?
I will be assigning this code to a button.
Thank you.
Lee

One option is to record a macro while you perform a Data...Text to Columns operation with the '/' as the delimiter:
Range("A1").TextToColumns Destination:=Range("A1"), DataType:=xlDelimited, _ TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, _ Semicolon:=False, Comma:=False, Space:=False, Other:=True, OtherChar _ :="/", FieldInfo:=Array(Array(1, 1), Array(2, 1), Array(3, 1)), _ TrailingMinusNumbers:=TrueObviously this code could be cleaned up a little, but I think you get the idea.

I have cleaned it up a little.... it works.
It does exactly what I wanted. Thank you.
I may have further questions along the way. But I do try to figure things out as much as i can!
Cheers

![]() |
Email Pop up from outlook...
|
Disable worksheet inserti...
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |