+ Reply to Thread
Results 1 to 2 of 2

Find cell with duplicates

  1. #1
    Registered User
    Join Date
    06-13-2006
    Posts
    76

    Find cell with duplicates

    Hi,

    I have a worksheet(1) with a lot of data in column B. In this data duplicates exist. I have another worksheet(2) (a copy of worksheet(1)) on which the user can add rows and data in column B. I have some code (see below) to copy values from column P of worksheet(2) to column F of worksheet(1).
    The only problem is there are duplicates in column B of worksheet(1). So by using the code below it allways gets the first duplicate and that's not how it should go.
    Can someone help me change the code so it will find the right duplicate? Thanks in advance!

    Please Login or Register  to view this content.

  2. #2
    Scott
    Guest

    RE: Find cell with duplicates

    Hello,

    The easiest way to get something like this to work would be to have another
    reference that you can double check. It could be a simple incrementation (ie
    in one column you have 1, 2 ,3 ... till the end). You could then have it
    search for your cell and if the increment number is correct do whatever
    modifications you want. Or if there is some other data you can use that
    could also work.

    cheers,

    Scott

    "leonidas" wrote:

    >
    > Hi,
    >
    > I have a worksheet(1) with a lot of data in column B. In this data
    > duplicates exist. I have another worksheet(2) (a copy of worksheet(1))
    > on which the user can add rows and data in column B. I have some code
    > (see below) to copy values from column P of worksheet(2) to column F of
    > worksheet(1).
    > The only problem is there are duplicates in column B of worksheet(1).
    > So by using the code below it allways gets the first duplicate and
    > that's not how it should go.
    > Can someone help me change the code so it will find the right
    > duplicate? Thanks in advance!
    >
    >
    > Code:
    > --------------------
    > For Each cell In Sheets("Begroting WVB Won").Range("B12:B242")
    > myvalue = cell.Offset(0, 14).Value
    > Set myCell = Worksheets("Totaaloverzicht Won").Range("B:B").Find _
    > (cell.Value)
    > myCell(1, 5).Value = myvalue
    > Next cell
    > --------------------
    >
    >
    > --
    > leonidas
    > ------------------------------------------------------------------------
    > leonidas's Profile: http://www.excelforum.com/member.php...o&userid=35375
    > View this thread: http://www.excelforum.com/showthread...hreadid=568887
    >
    >


+ 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