+ Reply to Thread
Results 1 to 7 of 7

Excel 2007 : Need help separating numbers/text

  1. #1
    Registered User
    Join Date
    04-27-2011
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    4

    Need help separating numbers/text

    Hello,

    Need help separating the following numbers/text on the same column:

    K103-1X

    B107X

    What I need to do is to separate the X from the rest of the number. Appreciate all your help. Please note, I am not familiar with Excel formulas at all. I tried using the Text-to-Column feature to do this but did not work.

    Thank you!

  2. #2
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Need help separating numbers/text

    dancediva,

    Is the X always the last letter? And do you just need it removed?

    ~tigeravatar

  3. #3
    Registered User
    Join Date
    04-27-2011
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Need help separating numbers/text

    Hi tigeravatar,

    Thank you for replying.

    Yes, the X is always the last letter and I need it moved to the column to the right.

  4. #4
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Need help separating numbers/text

    dancediva,

    Alright, then I'd recommend this:
    Insert two columns next to the column that has the data
    In this example, the column holding the data is in column A, and the two inserted columns are columns B and C. Also, the data starts in A1
    In the cell next to the data (in this example, B1) put in the following formula:

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

    Then in the cell to the right of that (in this example, C1) put in the following formula:

    =RIGHT(A1,1)

    Then copy/paste down until it has done so for all data
    Then hide column A

    Hope this helps,
    ~tigeravatar

  5. #5
    Registered User
    Join Date
    04-27-2011
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Need help separating numbers/text

    tigeravatar,

    The formula does work. However, there is a problem because not all numbers have the X at the end and the formula separates the last number/letter on every field. Is there a way to tell it to only use the formula only for the ones containing the X?

    Also, on column C I get a 'False' or 'True' instead of the X that needs to be separated from the numbers.

    Appreciate all your help

  6. #6
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Need help separating numbers/text

    dancediva,

    Updated Cell B1 formula to check if A1 ends with an X:
    =IF(RIGHT(A1,1)="X",LEFT(A1,LEN(A1)-1),"")

    Same update to the Cell C1 formula:
    =IF(RIGHT(A1,1)="X",RIGHT(A1,1),"")

    As I understand, the RIGHT function can only return a string, not True/False. In my test workbook, it is properly returning the X. I have attached that workbook.

    Hope this helps,
    ~tigeravatar
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    04-27-2011
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Need help separating numbers/text

    GREAT! it worked!

    Thank you soooo much.... I have no idea how the formulas are done (and probably never will

    so

    THANK YOU!

+ 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