+ Reply to Thread
Results 1 to 8 of 8

Using "Right" condition is not helping me....Pls

  1. #1
    Registered User
    Join Date
    04-01-2010
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2010
    Posts
    14

    Using "Right" condition is not helping me....Pls

    Hi,

    Anybody Please help me on the below...

    I have the following

    Cell A has "ABCDEF0123456789", i used "Right" condition to get the number from the cell, but I want to remove the number instead of copying the same.

    I want only ABCDEF left in Cell A.

    Please help,

    Thanks in advance

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Using "Right" condition is not helping me....Pls

    If your text is always in the leFt site of the string use this array FORMULA.

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    -- Array(CSE) { }, formulae are confirmed with Control+Shift+Enter.
    Not just Enter.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Using "Right" condition is not helping me....Pls

    Try using the LEFT function to "get" the ABCDEF.
    Then copy that formula cell
    And use PasteSpecial/Values back on top of the original cell.


    Or if you know it's always the left 6 characters you want,
    Try using Data - Text to columns - Fixed width - next
    Set the width to the 6th character - next
    Highlight the 2nd column and choose "Do not import this column"
    Finish

  4. #4
    Forum Expert Moo the Dog's Avatar
    Join Date
    09-28-2012
    Location
    Wisconsin
    MS-Off Ver
    Office 365 (PC & Mac)
    Posts
    1,845

    Re: Using "Right" condition is not helping me....Pls

    Well, if you want replace the contents of cell A1 with just the first 6 letters of what is in A1, you have multiple options (not all listed):

    1) Use a macro to replace all characters to the right of the letters with ""

    or

    2) Assuming your data starts in cell A1, use this formula in B1 and fill down: =LEFT(A1,6)

    You can then copy B1:Bxxx and using Paste Special: Values over the contents of column A.

    Of course, if your data has varying amounts of letters before numbers, then you will have to use a different formula, one that searches for the first number in each cell and only copies the first letters to the new cell. Something like:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    - Moo

  5. #5
    Registered User
    Join Date
    04-01-2010
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Using "Right" condition is not helping me....Pls

    Thank you for your replies...
    But I still did not get my answer

    aaaaa123456467
    dsfadf213146
    4545646fad
    asdfsdf54566664
    ewrwer4564789

    how can I extract only numbers from the above? or
    how can I extract only text from the above?
    I tried text to columns but couldnt find my answer

    please help

    thanks in advance

  6. #6
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Using "Right" condition is not helping me....Pls

    With the additional info (that probably should have been included in the original post)..

    It appears it's NOT always the left 6 characters.

    It becomes a much more difficult task to extract only the numbers or only the text..
    Particularly if there is no real pattern, sometimes the letters are first, sometimes the numbers are first..
    And it's not always the same # of numbers or letters.

    Can you post an actual book with a realistic sample set of data and your desired results?

  7. #7
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Using "Right" condition is not helping me....Pls

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    And this ARRAY formula.

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Replace all semi colons in my formula to comma!!

  8. #8
    Valued Forum Contributor
    Join Date
    10-29-2012
    Location
    Mojokerto,Indonesia
    MS-Off Ver
    Excel 2007
    Posts
    554

    Re: Using "Right" condition is not helping me....Pls

    array formula
    to extract number
    =MID(A1,MIN(IFERROR(IF(--MID(A1,ROW($1:$100),1),ROW($1:$100)),"")),COUNT(--MID(A1,ROW($1:$100),1)))

    to extract text
    =SUBSTITUTE(A1,MID(A1,MIN(IFERROR(IF(--MID(A1,ROW($1:$100),1),ROW($1:$100)),"")),COUNT(--MID(A1,ROW($1:$100),1))),)

+ 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] How to USE """"" cells count """"" change font color
    By austin123456 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-09-2013, 06:14 AM
  2. [SOLVED] Condition Format between "Blank" and "Zero"
    By tuongtu3 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 12-24-2012, 08:42 PM
  3. Replies: 3
    Last Post: 08-28-2012, 10:49 AM
  4. [SOLVED] Display a range of results with "*"&A1&"*" condition
    By Sordini in forum Excel General
    Replies: 2
    Last Post: 08-08-2012, 06:23 AM
  5. Replies: 10
    Last Post: 12-30-2011, 03:35 PM

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