+ Reply to Thread
Results 1 to 9 of 9

Formula to delete part of another cell value

  1. #1
    Forum Contributor
    Join Date
    12-07-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2021
    Posts
    126

    Formula to delete part of another cell value

    Hi,

    In one cell, I have this value: "HJK1A_58.PM01"

    I want to delete the '.PM01' part of the value from the period to the right.
    The value behind the period can also be longer, so I need to delete all tokens after (and including) the period.
    How would I do this?

    Thanks for helping me out here...

  2. #2
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Formula to delete part of another cell value

    Try this..

    Ctrl + H

    Find: .*
    Replace: Leave as blank
    Ok
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  3. #3
    Forum Contributor
    Join Date
    08-02-2012
    Location
    Pune
    MS-Off Ver
    Office 365 (Win 10)
    Posts
    489

    Re: Formula to delete part of another cell value

    PHP Code: 
    =LEFT(A1,SEARCH(".",A1)-1
    From This
    Please make the Post as solved, when you get your answer & Click * if you like my suggestion

  4. #4
    Forum Contributor
    Join Date
    12-07-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2021
    Posts
    126

    Re: Formula to delete part of another cell value

    Thanks you both for your help.
    I am going for akhileshgs's code...
    Works perfectly ! Issue solved...
    Thanks again.

  5. #5
    Forum Contributor
    Join Date
    08-02-2012
    Location
    Pune
    MS-Off Ver
    Office 365 (Win 10)
    Posts
    489

    Re: Formula to delete part of another cell value

    Glad that we could help you.

    Please close the thread. It will be the last option in the thread tools option in the ribbon

  6. #6
    Forum Contributor
    Join Date
    12-07-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2021
    Posts
    126

    Re: Formula to delete part of another cell value

    Adding to my ealier question:
    Can the same be done with multiple (but a fixed amount of) periods?
    I would like to get a tag name without the tokens from the last period on:

    A tag can be like:

    "ABC.DEF.GHI.PM01"
    "ABC.PJ.GHI.P05"
    "ABC.PJ.TK.02"

    I would like to get as a result:
    "ABC.DEF.GHI"
    "ABC.PJ.GHI"
    "ABC.PJ.TK"

    Thanks again for helping me out.
    Arnold

  7. #7
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Formula to delete part of another cell value

    More complicated, but do-able. With your data in column A, this should do the trick, copied down...

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


    It counts the number of instances of periods and substitutes the last instance with an "|" and then selects everything t the left of the "|".
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  8. #8
    Forum Contributor
    Join Date
    12-07-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2021
    Posts
    126

    Re: Formula to delete part of another cell value

    Works perfectly Glenn !

    Still wondering how you would figure these things out though...

    Thanks again.
    Arnold

  9. #9
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Formula to delete part of another cell value

    I'm an Excel amateur. The way that true experts can see round a problem and come up with an elegant solution is amazing. I only knew this one, 'cos I'd been helped by someone else, months ago, to do almost the same thing.

    Enjoy!

+ 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. Delete Part of value in cell
    By wallace23 in forum Excel General
    Replies: 1
    Last Post: 09-28-2011, 09:52 PM
  2. Excel 2007 : Delete Part of Cell
    By Madirish in forum Excel General
    Replies: 2
    Last Post: 04-30-2011, 12:56 PM
  3. Delete part of Cell value
    By Sidney Brubacher in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-01-2009, 11:04 AM
  4. Delete part of a formula (ROUND)
    By baool in forum Excel General
    Replies: 1
    Last Post: 08-16-2006, 11:35 AM
  5. [SOLVED] Delete part of a formula
    By dee in forum Excel General
    Replies: 6
    Last Post: 04-27-2005, 09:06 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