+ Reply to Thread
Results 1 to 9 of 9

Using IF statement to Pull Any Value That Starts with a Letter

  1. #1
    Registered User
    Join Date
    05-07-2019
    Location
    Nashville, TN
    MS-Off Ver
    2016
    Posts
    10

    Using IF statement to Pull Any Value That Starts with a Letter

    Hello!

    I am wanting to know if there is a way to use IF statements (or some other formula) to pull if values in a certain column start with any letter vs a number. In my scenario, Column A has a list of reference numbers that can start with any combination of letters OR numbers, and I want to know if there is a formula I can use to pull back a result that will tell me if that value starts with a letter, specifically.

    Thank you ahead of time!

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    81,276

    Re: Using IF statement to Pull Any Value That Starts with a Letter

    There is the ISTEXT function:

    =ISTEXT(LEFT(A1,1))
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,791

    Re: Using IF statement to Pull Any Value That Starts with a Letter

    You could try something like this in B2:

    =IF(AND(CODE(UPPER(LEFT(A2)))>64,CODE(UPPER(LEFT(A2)))<91),"Letter","Other")

    Hope this helps.

    Pete

  4. #4
    Registered User
    Join Date
    05-07-2019
    Location
    Nashville, TN
    MS-Off Ver
    2016
    Posts
    10

    Re: Using IF statement to Pull Any Value That Starts with a Letter

    Hello,

    I ran this function exactly as laid out above, and all values returned as "TRUE" whether the value started with a number or letter, so this did not work.

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    81,276

    Re: Using IF statement to Pull Any Value That Starts with a Letter

    In that case, try this:

    =ISTEXT(--LEFT(A1,1))

  6. #6
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,791

    Re: Using IF statement to Pull Any Value That Starts with a Letter

    It shouldn't produce TRUE, so you must have changed the formula. It worked for me on some sample data that I put together.

    Pete

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    81,276

    Re: Using IF statement to Pull Any Value That Starts with a Letter

    Pete - I think he was referring to my suggestion. I am sure yours works.

  8. #8
    Registered User
    Join Date
    05-07-2019
    Location
    Nashville, TN
    MS-Off Ver
    2016
    Posts
    10

    Re: Using IF statement to Pull Any Value That Starts with a Letter

    Thank you Pete! That worked! And my apologies, I did not see your response at the time that I had replied!

    Thank you all again!

  9. #9
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,791

    Re: Using IF statement to Pull Any Value That Starts with a Letter

    Glad to hear that it worked for you.

    If that takes care of your original question, please take a moment to select Thread Tools from the menu above and to the right of your first post in this thread, and mark the thread as SOLVED.

    Also, since you are relatively new to the forum, you might like to know that you can directly thank those who have helped you by clicking on the small "star" icon located in the lower left corner of a post that you have found to be helpful (not just in this thread - for any post that has helped you). This also adds to the reputation of the poster (the small green bars in the poster's profile).

    Pete

+ 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] Sum if cell value starts with the letter R
    By CakeMish in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-13-2015, 11:06 AM
  2. [SOLVED] If statement for identifying a cell that starts with a letter or number
    By Stephen R in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 08-25-2014, 09:46 AM
  3. Replies: 1
    Last Post: 05-17-2013, 04:56 AM
  4. keep column if text starts with letter
    By dundo84 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 03-21-2013, 08:27 PM
  5. Assign value for data that starts with a certain letter
    By Steve Bostwick in forum Excel General
    Replies: 4
    Last Post: 01-10-2011, 12:19 PM
  6. check if a Cell value starts with a Letter
    By vijay2482 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-02-2009, 09:53 AM
  7. Replies: 2
    Last Post: 07-26-2005, 03:05 AM

Tags for this Thread

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