Computing.Net > Forums > Office Software > Search strings excel document VB

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Search strings excel document VB

Reply to Message Icon

Name: lee123abc
Date: August 6, 2009 at 04:02:33 Pacific
OS: win xp 5.1.2600
CPU/Ram: 3mhz/2 gig
Product: Dell / PRECISION
Subcategory: Microsoft Office
Comment:

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



Sponsored Link
Ads by Google

Response Number 1
Name: DerbyDad03
Date: August 6, 2009 at 04:20:53 Pacific
Reply:

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:=True

Obviously this code could be cleaned up a little, but I think you get the idea.


0

Response Number 2
Name: lee123abc
Date: August 6, 2009 at 05:47:15 Pacific
Reply:

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


0

Response Number 3
Name: DerbyDad03
Date: August 6, 2009 at 06:13:46 Pacific
Reply:

Glad I could help.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


Email Pop up from outlook... Disable worksheet inserti...



Post Locked

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


Go to Office Software Forum Home


Sponsored links

Ads by Google


Results for: Search strings excel document VB

Password Cracker for Excel Document www.computing.net/answers/office/password-cracker-for-excel-document/3560.html

Compare two excel documents www.computing.net/answers/office/compare-two-excel-documents/6237.html

Excel 2000 Premium slow file opens www.computing.net/answers/office/excel-2000-premium-slow-file-opens-/3787.html