+ Reply to Thread
Results 1 to 8 of 8

Formula To Identify Text and Numbers from a column

  1. #1
    Registered User
    Join Date
    06-19-2008
    Posts
    10

    Formula To Identify Text and Numbers from a column

    Hi everyone.

    Thanks to the help i got from this forum a while ago I have a nice little formula that is a great help for my work. Thanks. But now I need to expand it a little and make it analyze another column.

    Basically I have

    |---A---|---B---|
    |1234-|---------|
    |F110-|---------|
    |--------|---------|
    |F111|----------|
    |1243-|---------|

    So i want column B to look at column A and return if it contains a number = 2, If it contains the first character as an 'F' = 1, and if it is blank to return nothing. So would look like

    |---A---|---B---|
    |1234-|---2----|
    |F110-|---1-----|
    |--------|---------|
    |F111|----1-----|
    |1243-|---2-----|

    Hope that makes sense.
    Last edited by SpAnKy; 05-12-2010 at 01:30 AM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: A tricky text formula

    In B1 then copied down:

    =IF(ISNUMBER(A1), 2, IF(LEFT(A1, 1)="F", 1, ""))
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    06-19-2008
    Posts
    10

    Re: A tricky text formula

    Is that all????

    Man u guys are good, and quick.

  4. #4
    Registered User
    Join Date
    06-19-2008
    Posts
    10

    Re: A tricky text formula

    Thanks that worked a treat.

    Cheers JB u rock

  5. #5
    Registered User
    Join Date
    06-19-2008
    Posts
    10

    Re: Formula To Identify Text and Numbers from a column

    Ok ive run into 1 little issue. Some of my numbers in COlumn 'A' are actually numbers stored as text and dont return correctly. Is it possible to have the formula Return the '2' if the cell doesnt contain an F??

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Formula To Identify Text and Numbers from a column

    Try this:

    =IF(ISNUMBER(A1+0), 2, IF(LEFT(A1, 1)="F", 1, ""))

  7. #7
    Registered User
    Join Date
    06-19-2008
    Posts
    10

    Re: Formula To Identify Text and Numbers from a column

    Ok works perfect. So what does that 0 actually mean?

  8. #8
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Formula To Identify Text and Numbers from a column

    It tricks text-based numbers BACK into a number form, causing the ISNUMBER() test to result in TRUE.

    If that takes care of your need, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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