+ Reply to Thread
Results 1 to 6 of 6

Pull data before a "-"

  1. #1
    Registered User
    Join Date
    03-01-2016
    Location
    New Jersey
    MS-Off Ver
    2013
    Posts
    47

    Pull data before a "-"

    Hi All,

    Hoping someone can help me here. I am looking to pull all the data from a cell before the "-" in the cell, however, if the cell does not have a "-" in it, then I want to pull the first word from that cell instead. Attached is an example. I figured out how to pull the data before the "-", I just can't seem to figure out how to add the part about if there is no dash, to pull the first word from the cell instead. My formula is in column R and is referencing column S.

    Thanks,
    Tom
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    06-04-2014
    Location
    USA
    MS-Off Ver
    Office 2016
    Posts
    72

    Re: Pull data before a "-"

    Are the formats of the "Reasons" known or can these show up as anything?

  3. #3
    Valued Forum Contributor ImranBhatti's Avatar
    Join Date
    03-27-2014
    Location
    Rawalpindi,Pakistan
    MS-Off Ver
    Office 365
    Posts
    1,784

    Re: Pull data before a "-"

    LIke this?

    =IF(ISNUMBER(SEARCH("-",S2)),LEFT(S2,FIND("-",S2)-1),LEFT(S2,1))
    Teach me Excel VBA

  4. #4
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Pull data before a "-"

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  5. #5
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Pull data before a "-"

    Enter in R2 and copy down
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  6. #6
    Registered User
    Join Date
    03-01-2016
    Location
    New Jersey
    MS-Off Ver
    2013
    Posts
    47

    Re: Pull data before a "-"

    This is perfect. Thank you so much.

+ 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] Pull all cells with value "Phone 1" & "Phone 3" from column A along with data in...
    By EXCEL40294 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-21-2015, 03:07 PM
  2. Replies: 7
    Last Post: 07-14-2015, 02:26 PM
  3. [SOLVED] Formula to pull out data from a list to create "Class Lists"
    By Losguapos1 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-16-2014, 10:09 AM
  4. [SOLVED] Trying to pull from data sheet that constantly changes to a preset "dashboard"
    By gigi79 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 11-06-2013, 09:19 AM
  5. Replies: 2
    Last Post: 06-06-2013, 12:45 PM
  6. Pull data from different columns based on info in column "A".
    By PowerSchoolDude in forum Excel General
    Replies: 2
    Last Post: 08-25-2009, 03:25 PM
  7. Replies: 0
    Last Post: 07-09-2009, 04:07 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