+ Reply to Thread
Results 1 to 4 of 4

Code to remove compare and remove duplicate value between 2 columns

  1. #1
    Forum Contributor
    Join Date
    03-12-2014
    Location
    India
    MS-Off Ver
    Excel 2013
    Posts
    118

    Code to remove compare and remove duplicate value between 2 columns

    I have a data In sheet “Magicbricks-Internal-Details”
    I am running the below code and data gets formatted in sheet Format data. After the format data I need additional code after the below code to perform following 4 task.

    1) In Sheet “Format data”, in column C, the data is of Property type like, 1BHK, 2BHK, 3BHK, etc. In Column C there are few blank cells. I want to fill that blank cell with the values in next column.
    For Example in attachment in Sheet “Format data” cell “C4” is blank and hence it has to be filled with Value in Cell “D4”.
    So the result should be as follows.
    Cell C4=Commercial Office Space
    Cell C7=Commercial Office Space
    Cell C8=Commercial Office Space
    Cell C11=Commercial Land


    2) In Sheet “Format data”, there is a data in column F and G. Some cell values in Column F is Matching with values in Column G.
    For Example Value in F5 = G5 (Juhu, Mumbai), F6=G6 (Kalyan, Mumbai), F7=G7 (Anand Nagar, Mumbai), F8=G8 (Lower Parel, Mumbai), F9=G9 (Virar, Mumbai), etc.
    Now I want to remove values in Column F which has similar values in Column G.
    So the result should be as follows.
    F | G
    5 (Blank) Juhu, Mumbai
    6 (Blank) Kalyan, Mumbai
    7 (Blank) Anand Nagar, Mumbai
    8 (Blank) Lower Parel, Mumbai
    9 (Blank) Virar, Mumbai
    10 in navyug nagar Tardeo, Mumbai

    3) This case is also Same as point 2
    In Sheet “Format data”, there is a data in column J and K. Some cell values in Column J is Matching with values in Column K.
    For Example Value in J3 = K3 (50 per sqft), J6=K6 (3000 per sqft), J9=K9 (12 per sqft), J12=K12 (11 per sqft), J14=K14 (4000 per sqft), etc.
    Now I want to remove values in Column J which has similar values in Column K.
    So the result should be as follows.
    J | K
    6 (Blank) 3000 per sqft
    9 (Blank) 12 per sqft
    12 (Blank) 11 per sqft
    14 (Blank) 4000 per sqft
    17 (Blank) 59 per sqft

    4) In Sheet “Format data”, there is a data in column H which are the amount in short words. (TH for Thousands, Cr for Crore and Lac for Lakhs)
    I want to convert the short word into actual figure in next column (Column I).
    So the result should be as follows.
    H | I
    2 40 TH 40000
    3 55.2 TH 55200
    4 5.5 Cr 55000000
    5 4000 4000
    6 15.5 Lac 1550000
    7 2.8 Cr 28000000
    8 2.5 Lac 250000
    9 8000 8000

    Please not we will be adding more record time to time and also might add any column in between. So request you to give cell and column reference details note in code.





    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Code to remove compare and remove duplicate value between 2 columns

    Try this:

    Please Login or Register  to view this content.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Forum Contributor
    Join Date
    03-12-2014
    Location
    India
    MS-Off Ver
    Excel 2013
    Posts
    118

    Re: Code to remove compare and remove duplicate value between 2 columns

    Hi,
    Thank you very much fr your help. I need one more help. When I am Combining my old code and your new it is not working. It shows compile error. Combined code is as below. Can you please rectify the corrections?
    Please Login or Register  to view this content.

  4. #4
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Code to remove compare and remove duplicate value between 2 columns

    Hi,

    Thanks for the rep!

    Just use a calling envelope:

    Please Login or Register  to view this content.
    Or, if you want them all in one:

    Please Login or Register  to view this content.
    Last edited by xladept; 01-22-2015 at 02:44 PM.

+ 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: 06-06-2013, 01:22 AM
  2. excel macro to remove specific columns and rows + remove duplicate
    By garrywelson in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 01-17-2013, 12:03 PM
  3. How remove duplicate from both columns
    By nexus888 in forum Excel General
    Replies: 5
    Last Post: 03-10-2012, 01:07 PM
  4. (NEW WORKBOOK) Compare duplicate values data and remove non compliant
    By lanziniad in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 01-11-2012, 12:10 PM
  5. [SOLVED] compare two columns and remove duplicates
    By Moni39 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-05-2005, 02: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