+ Reply to Thread
Results 1 to 5 of 5

Delete numbers from the first two cols if they are not equal to the numbers in third cols

  1. #1
    Registered User
    Join Date
    12-05-2015
    Location
    London, England
    MS-Off Ver
    2010
    Posts
    6

    Delete numbers from the first two cols if they are not equal to the numbers in third cols

    As shown in the image, there are three columns. The third column is the leading column because the numbers will be deleted in the first two columns based on that. What I don't know what excel function to use to delete the numbers from first and second column that do no exist in the third column. The highlighted ones in yellow are the ones that needs to be deleted. This is a just a sample. I have a dataset with million data points. And, I also want the cells to shift up.

    Thanks!!

    pic.jpg
    Attached Images Attached Images
    Last edited by mastermind11; 12-06-2015 at 01:33 PM.

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,424

    Re: Delete numbers from the first two cols if they are not equal to the numbers in third c

    You can't use a formula to delete a value - you would need a macro to do that.

    There is not much use in posting a .png file, as it can't be worked on, and, besides, many contributors cannot view .png files on this forum due to incompatibilities with some browsers. Attach a sample Excel workbook instead.

    Pete

  3. #3
    Registered User
    Join Date
    12-05-2015
    Location
    London, England
    MS-Off Ver
    2010
    Posts
    6

    Re: Delete numbers from the first two cols if they are not equal to the numbers in third c

    If it can't be deleted, then have a letter in place of it. I don't care as long it is not a number.

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2501
    Posts
    19,005

    Re: Delete numbers from the first two cols if they are not equal to the numbers in third c

    Quote Originally Posted by mastermind11 View Post
    As shown in the image, there are three columns. The third column is the leading column because the numbers will be deleted in the first two columns based on that. ...And, I also want the cells to shift up.
    From your description it would appear that you want change the 1st and 2nd columns so that they are exactly like the 3rd column. If that is the case then I would think that you could paste the following formula in cell A2 and copy over and down:
    Please Login or Register  to view this content.
    Let me know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  5. #5
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,962

    Re: Delete numbers from the first two cols if they are not equal to the numbers in third c

    The only way to shift cells up is to use a macro. However, once you start shifting cells up, what ever matches you had below will be destroyed.
    You could use helper columns on the same sheet or a different sheet

    Please Login or Register  to view this content.


    (How to) Upload a Workbook directly to the Forum
    (please do not post pictures or links to worksheets)
    • Click Advanced (next to quick post),
    • Scroll down until you see "Manage Attachments",
    • Click that then select "add files" (top right corner).
    • Click "Select Files" find your file, click "open" click "upload"
    • Once the upload is completed the file name will appear below the input boxes in this window.
    • Click "Done" at bottom right to close the Attachment Manager.
    • Click "Submit Reply"
    Note: Please do not attach password protected workbooks/worksheets
    Last edited by protonLeah; 12-06-2015 at 10:40 PM. Reason: spelling
    Ben Van Johnson

+ 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] Sum columns (duplicates in row header) & delete duplicate cols to leave single unique cols
    By kinrossfarm in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-20-2014, 05:50 AM
  2. search numbers in 2 cols
    By VBisgreat in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-12-2009, 06:47 PM
  3. Range.Select 1st pass 13 cols, 2nd paqss 25 cols twice as wide in error?
    By Craigm in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-02-2006, 06:04 AM
  4. [SOLVED] Cond Format:re color 2 cols, skip 2 cols
    By Tat in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-06-2005, 12:05 PM
  5. Cond Format:re color 2 cols, skip 2 cols
    By Tat in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-22-2005, 02:05 PM

Tags for this Thread

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