+ Reply to Thread
Results 1 to 8 of 8

Left vs Left$

  1. #1
    Valued Forum Contributor
    Join Date
    08-29-2012
    Location
    In lockdown
    MS-Off Ver
    Excel 2010 (2003 to 2016 but 2010 for choice)
    Posts
    1,766

    Left vs Left$

    Probably a dumb question.

    I read that Left$ processes faster than Left. In that case, why/when would you ever need to use the Left version?
    *******************************************************

    HELP WANTED! (Links to Forum threads)
    Trying to create reusable code for Custom Events at Workbook (not Application) level

    *******************************************************

  2. #2
    Valued Forum Contributor
    Join Date
    08-29-2012
    Location
    In lockdown
    MS-Off Ver
    Excel 2010 (2003 to 2016 but 2010 for choice)
    Posts
    1,766

    Re: Left vs Left$

    Oh wait. NULLs.

    Anything else?

  3. #3
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: Left vs Left$

    Hi,

    The $ means you are dealing with a string and without means it is a variant data type. See:
    http://bytes.com/topic/access/answer...-left-function
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Left vs Left$

    Left only has 4 characters, Left$ has 5, and you need to hold down shift to get the last one.
    If posting code please use code tags, see here.

  5. #5
    Valued Forum Contributor
    Join Date
    08-29-2012
    Location
    In lockdown
    MS-Off Ver
    Excel 2010 (2003 to 2016 but 2010 for choice)
    Posts
    1,766

    Re: Left vs Left$

    Thanks Marvin.

    I should have made clear in the OP that I already know what the difference between the two is.

    I was asking why/when would you ever NEED to use Left instead of Left$ (Assuming you have no NULLs that is)


    Or to put it another way round - If I ensured that the input will never be a NULL, and because Left$ is faster than Left, then I should always use Left$ instead of Left? Yes/No?
    Last edited by mc84excel; 11-18-2014 at 05:37 PM. Reason: clarify

  6. #6
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Left vs Left$

    mc84excel

    That was kind of meant to be a joke/humorous aside type of thing.

    Sorry if I offended you in any way.

  7. #7
    Valued Forum Contributor
    Join Date
    08-29-2012
    Location
    In lockdown
    MS-Off Ver
    Excel 2010 (2003 to 2016 but 2010 for choice)
    Posts
    1,766

    Re: Left vs Left$

    Quote Originally Posted by Norie View Post
    mc84excel

    That was kind of meant to be a joke/humorous aside type of thing.

    Sorry if I offended you in any way.
    Norie it's all good - I'm not offended. Although I didn't get it was a joke straight away. (Adding a on the same post might have helped clue me in!)

  8. #8
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Re: Left vs Left$


    One is cheaper than the other ‼

    Sorry, bad joke !

+ 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] If 5 days left then MsgBox "5 Days Left"
    By HerryMarkowitz in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-12-2014, 11:59 AM
  2. Collapse columns from left to right (not right to left)
    By SiriS in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-26-2013, 04:00 PM
  3. [SOLVED] LEFT(A1,3) or LEFT(RC[-1],3) which one is more speedy ?
    By nur2544 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-27-2013, 02:23 AM
  4. Automated =Left, =Left(Right), =Right & Concatenate
    By mikeconomy in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-29-2011, 08:07 AM
  5. Replies: 1
    Last Post: 07-04-2005, 09: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