+ Reply to Thread
Results 1 to 8 of 8

How do I count from the left upto the comma

  1. #1
    Registered User
    Join Date
    05-23-2014
    Posts
    6

    How do I count from the left upto the comma

    Greetings All

    Can someone please point me in the right direction with this

    I am trying to capture the first location upto but not including the comma in a large range of information I have tried various Right from etc but I need something a bit more sophisticated like a find upto

    My data is:

    Lancashire, Todmorden
    Halifax, Elland
    West Yorkshire, Brighouse
    Huddersfield, Cloth Hall Street
    Newcastle Upon Tyne, Haymarket

    So need to return in the next cell, Lancashire, then Halifax in the next etc

    Can anyone point me in the right direction?

    Thanks
    Adam

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,596

    Re: How do I count from the left upto the comma

    Here, try this:

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

  3. #3
    Forum Expert
    Join Date
    12-03-2009
    Location
    Florence, Italy
    MS-Off Ver
    Excel 2019
    Posts
    1,796

    Re: How do I count from the left upto the comma

    Hi ajbaldwin, hi Zbor

    a "funny" -not robust - approach could be:

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


    Regards
    -----------------------------------------------------

    At Excelforum, you can say "Thank you!" by clicking the star icon ("Add Reputation") below the post.

    Please, mark your thread [SOLVED] if you received your answer.

  4. #4
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,596

    Re: How do I count from the left upto the comma

    sure.
    It's better to put same value for both:

    Please Login or Register  to view this content.
    Since you can not "cut" less than 300 (as you add 300 spaces), a no need to cut word longer than 50

    This is not same as you looking for "first space" because it's more likely that first space will appear in less than 50 characters, but looking for first comma will cut your sentence since it might never appear.

    This might never happend but it's worth to consider it.

  5. #5
    Forum Expert
    Join Date
    12-03-2009
    Location
    Florence, Italy
    MS-Off Ver
    Excel 2019
    Posts
    1,796

    Re: How do I count from the left upto the comma

    Hi zbor,

    I'm in total agreement: formula was shared just for fun.

    It should work.

    Regards

  6. #6
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,596

    Re: How do I count from the left upto the comma

    No problem.
    It will also work just ajbaldwin can be aware of potential output.

  7. #7
    Forum Expert boopathiraja's Avatar
    Join Date
    07-12-2013
    Location
    Coimbatore,TamilNadu, India
    MS-Off Ver
    Excel 2007, 2013, 2016, 365
    Posts
    1,455

    Re: How do I count from the left upto the comma

    Hi, One more way

    copy the entire column to adjacent column and select the adjacent column give f5 find ,* and replace with none...
    Click just below left if it helps, Boo?ath?

  8. #8
    Registered User
    Join Date
    05-23-2014
    Posts
    6

    Re: How do I count from the left upto the comma

    Works a treat, thanks all

+ 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. Bring back text, Left until Comma
    By subtilty in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-13-2014, 08:05 AM
  2. Find and remove all text to the left of last comma (including comma) in a cell
    By Excelrookie_1 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-05-2013, 08:47 AM
  3. left to first or second comma
    By terrysoper1973 in forum Excel General
    Replies: 5
    Last Post: 09-08-2011, 08:13 PM
  4. Replies: 8
    Last Post: 08-11-2009, 09:57 AM
  5. Using a function to pull everything right/left of a comma
    By txbullets in forum Excel General
    Replies: 3
    Last Post: 07-14-2008, 12:39 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