+ Reply to Thread
Results 1 to 10 of 10

Remove all characters before space in line

  1. #1
    Registered User
    Join Date
    08-29-2012
    Location
    ny
    MS-Off Ver
    Excel 2007
    Posts
    5

    Remove all characters before space in line

    Hi all,

    I am trying to remove all characters left of a space in the following line...
    MD5: a86ef51bf42103dfaddc18bb37d115b8 texlive-utils-2007-57.el6_2.i686.rpm
    the space is right before the texlive in the above statement...
    I have about 5000 rows where I have to do this and each one is different... However, they all have that space in it..

    thanks,

    gary

  2. #2
    Forum Guru tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Remove all characters before space in line

    gary,

    Welcome to the forum!
    It looks like there is an earlier space also: "MD5: a86e..."
    Will the space always be the second space? Will the space always be the first space when going from the right?
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Registered User
    Join Date
    08-29-2012
    Location
    ny
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Remove all characters before space in line

    Hi tigeravator.

    Thanks for your help...yes, the first space will always be there as well..
    they will all read MD5: and then a space.

  4. #4
    Forum Guru tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Remove all characters before space in line

    Alrght, give this a try:

    Assumptions:
    • There are always 2 spaces
    • You only want the information to the right of the second space
    Please Login or Register  to view this content.


    ---------- Post added at 12:55 PM ---------- Previous post was at 12:52 PM ----------

    Alternately you can use the Find and Replace dialog (ctrl+h)
    In the Find what: "* texlive" (no quotes)
    In the Replace with: "texlive" (no quotes)

    Click Replace All

  5. #5
    Registered User
    Join Date
    08-29-2012
    Location
    ny
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Remove all characters before space in line

    Hi tigeravatar,

    it worked but how do I increment it for each line... In the formula you gave me it has cell a1 - mine goes a1 - a2192

    thanks,

    gary

  6. #6
    Forum Guru tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Remove all characters before space in line

    Just copy the formula down. So if the formula is in cell B1, just copy it down to B2192. Alternately, you can double-click the fill handle

  7. #7
    Registered User
    Join Date
    08-29-2012
    Location
    ny
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Remove all characters before space in line

    Thanks for your help, It got up to line 630 and all of a sudden started producing blank results... I am so confused.. LOL

  8. #8
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,072

    Re: Remove all characters before space in line

    Take a look in A630. Something changed. There's probably not a space after MD5:
    ChemistB
    My 2

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  9. #9
    Registered User
    Join Date
    08-29-2012
    Location
    ny
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Remove all characters before space in line

    that is what I thought..

    here is line 628 and 629 (this is all on 1 line)...
    MD5: b63403f2cdccb73beeba46f2ccdebb2f kexec-tools-1.102pre-154.el5.x86_64.rpm kexec-tools-1.102pre-154.el5.x86_64.rpm
    MD5: 84a3bde6702fd0b212fb4621f71a46fc kexec-tools-1.102pre-154.el5.src.rpm kexec-tools-1.102pre-154.el5.src.rpm
    here is line 630...
    MD5: 24ea129a5e61c4c27b0bbbd40458f2be libsmbclient-devel-3.0.33-3.38.el5_8.i386.rpm

  10. #10
    Forum Guru tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Remove all characters before space in line

    If it is returning blank results that probably means you have trailing spaces. Rather than delete the trailing spaces manually, just alter the formula to include a second Trim() function:
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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