+ Reply to Thread
Results 1 to 8 of 8

Formula to remove contents of one cell from another cell

  1. #1
    Registered User
    Join Date
    11-13-2012
    Location
    ann arbor
    MS-Off Ver
    Excel 2010
    Posts
    67

    Formula to remove contents of one cell from another cell

    Hi, I am trying to remove the characters and text of one cell from another. This is because I am getting a lot of data that was suppose to be delimited but is not for some terrible reason. So all of my data is in cell B1, instead of a nice format. Luckily the only info in B1 that I need always starts with the letters "SCD". I know how to find the first occurrence of the text string which starts with SCD but now I need to remove that first occurrence and pull the next one so on and so forth.

    Here is an example, where I have cells B1 and A2; and the formula would go in B2. So the contents of cell A2 are found and removed from B1.

    B1: 111 444 SCD999 333 --- sss eee iii SCD444 ddd lll SDC888

    A2: SCD999

    B2: 111 444 333 --- sss eee iii SCD444 ddd lll SDC888

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Formula to remove contents of one cell from another cell

    Hi,

    If the strings are of equal length 14 to the end of the SCD999 reference then just use TextToColumns with a Fixed width split at positions 9 & 14.
    Then just delete the cokumn with the SCD reference. If necessary concatenate the two columns that are left to get back to a single string.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    11-13-2012
    Location
    ann arbor
    MS-Off Ver
    Excel 2010
    Posts
    67

    Re: Formula to remove contents of one cell from another cell

    Oops, Sorry about that. The data really is in no format or pattern that makes sense, only that the data I need starts with SCD. Sometimes those data points are 4 characters away or 30 in the cell.

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Formula to remove contents of one cell from another cell

    Hi,

    If the SCD references are always SCD??? (i.e. always 6 characters) then you could use a Find/Replace.
    Select the range of cells and in the Find box enter SCD???, leave the Replace box blank and then OK

  5. #5
    Registered User
    Join Date
    11-13-2012
    Location
    ann arbor
    MS-Off Ver
    Excel 2010
    Posts
    67

    Re: Formula to remove contents of one cell from another cell

    The are not. I would do find & replace but I have to do this many times as in the contents of cell B1 has 55 data points in it and this is just the first file.

    It is frustrating because I basically just need a Find and Replace formula, like =FindAndReplace(start_text,remove_text).

    Where the start_text is the cell which contains the original output and the remove_text is what is being deleted.

  6. #6
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Formula to remove contents of one cell from another cell

    Hi,

    How about

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

  7. #7
    Registered User
    Join Date
    11-13-2012
    Location
    ann arbor
    MS-Off Ver
    Excel 2010
    Posts
    67

    Re: Formula to remove contents of one cell from another cell

    I am sorry, what is that suppose to do?

  8. #8
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Formula to remove contents of one cell from another cell

    It will remove the first occurrence of the SCD??? string and leave the rest of the string.

+ 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] How to remove date in one cell when another cell's contents are cleared.
    By jm263 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-24-2013, 08:22 PM
  2. Automatically remove contents of a cell
    By BrianKusch in forum Excel General
    Replies: 2
    Last Post: 06-05-2012, 12:01 PM
  3. remove row based on two cell contents
    By uncleslinky in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-02-2011, 08:10 AM
  4. Need to remove some contents of a cell.
    By davidbeaton in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-23-2008, 04:51 PM
  5. Replies: 1
    Last Post: 07-01-2005, 10:57 AM

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