+ Reply to Thread
Results 1 to 3 of 3

delete duplicated first row

  1. #1
    Registered User
    Join Date
    08-29-2009
    Location
    singapore
    MS-Off Ver
    Excel 2003
    Posts
    1

    Wink delete duplicated first row

    Hi All

    I am new to EXCEL VBA. I am learning to write a macro where any duplicate cell found in column B, the whole row (the first duplication not the second) will be deleted. I found this and amended a bit. It works but i do not really understand the command.
    Please Login or Register  to view this content.
    "old" is set as rw.cells(1,1).value. But there is no definition of the "lastest". How can VBA knows that "lastest" is actually the row after "old"?
    thank you
    Last edited by royUK; 08-29-2009 at 07:10 AM.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: delete duplicated first row

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here

    I will add them this time!
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: delete duplicated first row

    It appears that the varibles are not declared as specific types so Excel has to interpret them as Variants. This is inefficient & poor practice.

+ 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