+ Reply to Thread
Results 1 to 4 of 4

LEFT ampersand RIGHT Is not working in a sheet, It used to work.!

  1. #1
    Forum Contributor
    Join Date
    10-21-2012
    Location
    miami, florida usa
    MS-Off Ver
    Excel 2007
    Posts
    260

    Red face LEFT ampersand RIGHT Is not working in a sheet, It used to work.!

    Hi Dear forums Expert !

    well, this is the problem :

    Let say that In G5 I have an String 05-12-07-28-02-17-26-31-13-33-11-27-16-29-32
    NOTE:
    -.String not always have the same amount of Numbers, Sometimes are 12, others times are 16, some other 14, etc,etc
    -.Sheet is clean, it doesn't have any VB macro.

    From that String I need to extract 8 numbers In different ways, as Follow:

    First 8 numbers
    First 7 numbers, and Last 1 Number.
    First 6 numbers, and Last 2 Numbers
    First 5 numbers, and Last 3 Numbers
    etc

    Then i applied The LEFT, RIGHT Formula
    Please Login or Register  to view this content.
    But i dont get the 8 numbers as desire, this is what i getting:


    05-12-07-28-02-17-26-31
    05-12-07-28-02-17-26
    05-12-07-28-02-17
    05-12-07-28-02


    please, can i have some help, i don't know what i'm doing wrong..

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: LEFT ampersand RIGHT Is not working in a sheet, It used to work.!

    what does just =right(g5,3) return?
    have you tried
    =LEFT(trim(G5),20)&RIGHT(trim(G5),3)
    Last edited by martindwilson; 09-11-2013 at 02:57 PM.
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Forum Contributor
    Join Date
    10-21-2012
    Location
    miami, florida usa
    MS-Off Ver
    Excel 2007
    Posts
    260

    Re: LEFT ampersand RIGHT Is not working in a sheet, It used to work.!

    Hi Mr Martindwilson,

    It worked with the "trim",

    Thank you !

    but i'm still thinking why no work the "left&right"
    i tried in another sheet and the left+right with the ampersand work
    but not on this other sheet.

    Again, Thank you so much !!!

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: LEFT ampersand RIGHT Is not working in a sheet, It used to work.!

    if it didnt work without trim() then you have trailing spaces after the string,trim() simply removes them

+ 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. GetAsyncKeyState work rclick, not left
    By rcamarda390 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-31-2016, 12:36 PM
  2. [SOLVED] Have a working macro work on a different sheet in the same workbook
    By steven_e in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-12-2013, 02:04 PM
  3. Left-aligning certain cells not working??
    By WorldBuilder in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-15-2012, 11:39 AM
  4. =LEFT won't work with =IF
    By o'h3nry in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 10-14-2009, 12:33 PM
  5. Sort Left to Right not working
    By Juan in forum Excel General
    Replies: 3
    Last Post: 07-29-2005, 03:05 PM

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