+ Reply to Thread
Results 1 to 4 of 4

Left function returns a number

Hybrid View

grifter Left function returns a number 10-08-2020, 08:14 AM
Phuocam Re: Left function returns a... 10-08-2020, 08:18 AM
grifter Re: Left function returns a... 10-08-2020, 08:33 AM
AliGW Re: Left function returns a... 10-08-2020, 08:41 AM
  1. #1
    Registered User
    Join Date
    04-16-2012
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    13

    Left function returns a number

    I''ve been using the same script for years to swap out names that are in reverse to first name + Last name, yet today it is only returning the number portion of the text.

    For example

    Smith, Jimmy

    =LEFT(SEARCH(",", A2)-1)

    Returns 5 instead of "Smith"

    I've also used find instead of search and it still does it.

    Any ideas?

    Thanks

    G

  2. #2
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2024
    Posts
    6,175

    Re: Left function returns a number

    Try:

    =LEFT(A2,SEARCH(",", A2)-1)

  3. #3
    Registered User
    Join Date
    04-16-2012
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: Left function returns a number

    Thanks for pointing that out, a bit rusty these days not enough practice!
    Last edited by AliGW; 10-08-2020 at 08:41 AM. Reason: PLEASE don't quote unnecessarily!

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,371

    Re: Left function returns a number

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

+ 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] ATAN Function returns FALSE (when IFERROR added) and DIV/0 when left
    By aabbey in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-26-2018, 09:05 AM
  2. [SOLVED] left function without set number of characters
    By courtie89 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-08-2015, 06:17 PM
  3. Left Function to Stop at a Number
    By pat3white in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-24-2013, 10:20 AM
  4. How to force LEFT function to recognize a number?
    By Tommy1005 in forum Excel General
    Replies: 3
    Last Post: 07-29-2009, 10:44 AM
  5. Replies: 4
    Last Post: 06-30-2009, 02:40 AM
  6. Function that returns a week number
    By hayaperi in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 11-13-2007, 09:28 PM
  7. Len function returns bigger number
    By Khoshravan in forum Excel General
    Replies: 10
    Last Post: 05-21-2006, 03:40 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