+ Reply to Thread
Results 1 to 5 of 5

Delete Cell Numbers of Column B From Column A (Column B Small and Column A too big)

  1. #1
    Registered User
    Join Date
    03-21-2012
    Location
    Karachi, Pakistan
    MS-Off Ver
    Excel 2010
    Posts
    81

    Delete Cell Numbers of Column B From Column A (Column B Small and Column A too big)

    I am new to use Excel.I am using MS OFFICE PROFESSIONAL PLUS 2010.
    Operating system Windows 7. I have 50 Lacs Local Cell Numbers and i want
    to delete my competitors cell numbers from this big list which is 302 cell numbers.

    I divide this big list into 5 Sheets because each excel sheet allow 1048576 rows.
    The big list is paste in column A and the competitor list is paste on column B.

    Column "A" have all cell numbers
    Range = (A2:A1048576)

    Column B have all competitors cell numbers
    Range = (B2:B302)

    Column C for refine result without competitors

    I want to delete Column B values from column A so what can i do for it.

  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: Delete Cell Numbers of Column B From Column A (Column B Small and Column A too big)

    Hi,

    Are you really saying that you have over 5 million records in your 5 sheets?

    If so are there duplicates amongst them? If so the first step would be to reduce these to a unique list. So extract the unique numbers from each of the 5 sheets and compile a separate list by stacking the unique numbers from each sheet underneath each other, then finally when you've done that extract a unique list from that new list.

    When you've done that, and lets's assume this final unique list is now in column E, in F1 enter =MATCH(E1,B$2:B$302,false) and copy this down column F as far as you need. Then filter column F for the #N/A values since these are those numbers that aren't in your B2:B302.
    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 Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885

    Re: Delete Cell Numbers of Column B From Column A (Column B Small and Column A too big)

    I can't help but think a Dictionary or Collection object might make really quick work of this. Unfortunately I'm not very good at coding them. Leith coded one for me a year or so ago and it reduced my multi-replacement macro by about 99% in time.

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Delete Cell Numbers of Column B From Column A (Column B Small and Column A too big)

    Hello it_electronics2000 ,

    This is the method Paul was was describing. The macro uses the Dictionary Object to identify and remove duplicate values. Each column of numbers is first read into an array before being processed. This greatly speeds up execution time. Add a new standard VBA Module to your workbook. Copy and paste this code into the module. You can the add a button on a worksheet to call the macro.
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  5. #5
    Registered User
    Join Date
    03-21-2012
    Location
    Karachi, Pakistan
    MS-Off Ver
    Excel 2010
    Posts
    81

    Re: Delete Cell Numbers of Column B From Column A (Column B Small and Column A too big)

    I am using this formula like this for exact matching with rows.
    =IF(COUNTIF($B$2:$B$302,A2)>0,"",A2)
    Thank you very much "Down Under" for creating above formula.

    *The conventional definition of management is getting work done through people*
    *but real management is developing people through work*

+ 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