+ Reply to Thread
Results 1 to 10 of 10

remove a duplicate value and add in next sheet

  1. #1
    Registered User
    Join Date
    11-12-2010
    Location
    uae
    MS-Off Ver
    Excel 2003
    Posts
    21

    remove a duplicate value and add in next sheet

    Hi,

    I have a project report with having muliple / duplicated project code for each project. Every project has a completion date. Once the project is completed as per the given date, it has to be removed from 1st sheet and copied in next sheet. Could you pls guide me to do it. The sample workbook is attached herewith. Thanks in advance


    ravi
    Attached Files Attached Files
    Last edited by raviexcel; 11-23-2010 at 02:51 PM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: remove a duplicate value and add in next sheet

    Like so:
    Please Login or Register  to view this content.
    Attached Files Attached Files
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    11-12-2010
    Location
    uae
    MS-Off Ver
    Excel 2003
    Posts
    21

    Re: remove a duplicate value and add in next sheet

    Hi,
    Thanks for the reply. But this code give an error while it runs. The run time error - 1004 is "delete method of range class failed"

    Thanks,
    ravi

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: remove a duplicate value and add in next sheet

    It works in the sample I created for you. Post the workbook you're using with the macro installed so I can see the same error you're seeing.

  5. #5
    Registered User
    Join Date
    11-12-2010
    Location
    uae
    MS-Off Ver
    Excel 2003
    Posts
    21

    Re: remove a duplicate value and add in next sheet

    Hi,

    Thanks a lot it works fine. I have a small moficiation in column E(completion date) which should have a formula - =IF(AND(COUNTIF($A$2:A2,A2)=1,COUNTIF(A:A,A2)>1),B2+30,TODAY()+1).

    can it also so coded which makes me to drag each time. I have added a file once again where u can see. I want all first duplicate should have a date (Project date + 30days). And all others Today()+1

    Thanks...

    ravi
    Attached Files Attached Files

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: remove a duplicate value and add in next sheet

    Quote Originally Posted by raviexcel View Post
    can it also so coded which makes me to drag each time?
    I have no idea what this means.
    Last edited by JBeaucaire; 11-23-2010 at 01:57 PM.

  7. #7
    Registered User
    Join Date
    11-12-2010
    Location
    uae
    MS-Off Ver
    Excel 2003
    Posts
    21

    Re: remove a duplicate value and add in next sheet

    Hi,

    i need to add the formula in E column(completion date) - =IF(AND(COUNTIF($A$2:A2,A2)=1,COUNTIF(A:A,A2)>1),B2+30,TODAY()+1). since i need to give a condition only for the first duplicate value that will have the completion days of 30 and all others today()+1 as per the formula. If this formula can be added in the same vb code, it will be helpful.

    thanks

    ravi
    Last edited by raviexcel; 11-23-2010 at 01:22 PM.

  8. #8
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: remove a duplicate value and add in next sheet

    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    11-12-2010
    Location
    uae
    MS-Off Ver
    Excel 2003
    Posts
    21

    Re: remove a duplicate value and add in next sheet

    Hi JB,

    THANKS A LOT ONCE AGAIN. It's solved my problem..

  10. #10
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: remove a duplicate value and add in next sheet

    If that takes care of your need, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

+ 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