+ Reply to Thread
Results 1 to 9 of 9

characters in text strings

Hybrid View

jmilliken characters in text strings 09-24-2014, 01:11 PM
romperstomper Re: characters in text strings 09-24-2014, 01:26 PM
jmilliken Re: characters in text strings 09-24-2014, 01:35 PM
jmilliken Re: characters in text strings 09-24-2014, 01:54 PM
shg Re: characters in text strings 09-24-2014, 02:01 PM
jmilliken Re: characters in text strings 09-24-2014, 02:07 PM
shg Re: characters in text strings 09-24-2014, 02:08 PM
jmilliken Re: characters in text strings 09-25-2014, 12:41 PM
shg Re: characters in text strings 09-25-2014, 01:44 PM
  1. #1
    Registered User
    Join Date
    09-18-2014
    Location
    Dillsburg PA
    MS-Off Ver
    2013
    Posts
    18

    Angry characters in text strings

    OK, I'm getting really frustrated here... I need to do something REALLY simple.... that ive done 10 million times before. I need to look at a text string in a cell, and do specific actions based on the string in the cell. Easy case statement, right?

    Here's where it gets crazy....

    the values in the cell are things like #1, #2 PW, 4.5".

    VB doesn't like statements like
    case #1
    case asc(35)&1
    I'm completely stuck. I've done a lot of searching, and the only information I seem to find is returning the ascii value, or concatenating an ascii value into a string.... any help is appreciated. thanks in advance!

  2. #2
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,971

    Re: characters in text strings

    You need to use "#1" in quotes.
    Everyone who confuses correlation and causation ends up dead.

  3. #3
    Registered User
    Join Date
    09-18-2014
    Location
    Dillsburg PA
    MS-Off Ver
    2013
    Posts
    18

    Re: characters in text strings

    ugh.... it's been a LONG day..... between the missing quotes, and the fact that the text string is actually "#1 space space space space space space"... it works now. THANKS!

  4. #4
    Registered User
    Join Date
    09-18-2014
    Location
    Dillsburg PA
    MS-Off Ver
    2013
    Posts
    18

    Re: characters in text strings

    wait.... it doesn't like strings like
    case "12" POT                                 "
    ugh.....

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: characters in text strings

    Case "12", "POT", Bob's your uncle", "Something else"
    Entia non sunt multiplicanda sine necessitate

  6. #6
    Registered User
    Join Date
    09-18-2014
    Location
    Dillsburg PA
    MS-Off Ver
    2013
    Posts
    18

    Re: characters in text strings

    sorry if I wasn't clear.... the string itself has the quotes in it.... 12" POT....

  7. #7
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: characters in text strings

    Case "12"" POT"
    Edit: By the way, those tests are case-sensitive.

  8. #8
    Registered User
    Join Date
    09-18-2014
    Location
    Dillsburg PA
    MS-Off Ver
    2013
    Posts
    18

    Re: characters in text strings

    the double quotes worked. thanks!

  9. #9
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: characters in text strings

    You're welcome.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Adding characters to raw data text strings
    By nighthalcyon in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-07-2013, 10:02 AM
  2. Pass text strings longer than 255 characters
    By carry in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-22-2011, 12:26 PM
  3. Identifying Characters in Text Strings
    By Buzzpipaluk in forum Excel General
    Replies: 3
    Last Post: 03-22-2010, 09:50 AM
  4. Inserting same characters to text strings in several cell
    By 10036760 in forum Excel - New Users/Basics
    Replies: 6
    Last Post: 10-02-2007, 07:27 PM
  5. Replies: 7
    Last Post: 04-20-2006, 07:30 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1