+ Reply to Thread
Results 1 to 4 of 4

Remove values from a Cell based on a list

  1. #1
    Registered User
    Join Date
    02-05-2017
    Location
    Netherlands
    MS-Off Ver
    2010
    Posts
    8

    Question Remove values from a Cell based on a list

    Hello All,

    For a school project i am trying to achieve the following in excel.

    I have an input which contains many values with a ";" in between.
    This input has too many values, certain values must be deleted. Therefore i created a REMOVE-list of more than 4000 values.
    The output must be only numbers from the input that are not in the REMOVE-list.

    See image below as an example.

    xe.png


    What is the best method of doing this?

    EDIT: i tried the SUBSTITUTE function, but it doesn't work with 4000 values.

    Thank in advance, and merry christmas to all!
    Last edited by silkroad69; 12-24-2018 at 11:37 AM.

  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: Remove values from a Cell based on a list

    Is there just one input cell, or a column of them

    If one then I'd be inclined to split the input cell across many columns with the Data Text To Columns functionality.
    Then use a VLOOKUP in the row underneath to check that the individual values exist in your values to be removed.
    in the row underenath that use an IF function to return the value if it's not in the list and concatenate it with the value in the cell to the left. Copy that across and your final cell will contain the values you seek.

    Then copy that final cell and paste it as values.

    You could use that same method even if you have many rows, you'd just need to add some blank rows between each cell so that you have some room for the working columns.


    Otherwise a VBA solution.
    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
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,213

    Re: Remove values from a Cell based on a list

    With input at A2 and Remove list at C2:C9999

    B2 and drag down
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    or with Excel365 textjoin, press CTRL+Shift+Enter

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

  4. #4
    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: Remove values from a Cell based on a list

    Or try this:
    1. Enter in B2 and copy down
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    2. Enter in C2 and copy down
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    3. Enter in E2
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    v A B C D E
    1
    2 250;380;485;15;84;895;4852;518;485 250 #N/A 15 250;895
    3 380 20 16
    4 485 16 17
    5 15 1 18
    6 84 11 19
    7 895 #N/A 20
    8 4852 19 50
    9 518 12 81
    10 485 16 82
    11 83
    12 84
    13 518
    14 519
    15 520
    16 484
    17 485
    18 4850
    19 4851
    20 4852
    21 380
    22 381
    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

+ 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. Replies: 3
    Last Post: 11-13-2015, 05:10 AM
  2. Replies: 2
    Last Post: 05-26-2015, 10:36 AM
  3. [SOLVED] Normalizing Data based on list of values to remove
    By JP Romano in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-30-2015, 12:11 PM
  4. have vba remove values from one list based on entries from another list
    By frugal in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-11-2013, 06:36 AM
  5. Replies: 3
    Last Post: 07-11-2012, 05:20 AM
  6. search cell values based on list of values in other sheet and add color to row
    By darkbraids in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-10-2012, 08:35 AM
  7. set cell values based on selection from list
    By vhrao in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-17-2006, 03:35 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