Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Merjet and Troy, thank you for your help. I really
appreciate your solutions. -----Original Message----- Suppose the three fields are columns B-D (2-4) starting in row2. Then the following code will put a 1 in col A when the next row doesn't match. (It assumes duplicates are contiguous, not scattered.) HTH, Merjet Sub macro1() Dim iRow As Integer Dim iCt As Integer Dim ws As Worksheet Set ws = Sheets("Sheet1") iRow = ws.Range("B65536").End(xlUp).Row ws.Range("A2:A" & iRow).Clear ws.Range("A2") = 1 For iCt = 3 To iRow If ws.Cells(iCt, 2) < ws.Cells(iCt - 1, 2) Or _ ws.Cells(iCt, 3) < ws.Cells(iCt - 1, 3) Or _ ws.Cells(iCt, 4) < ws.Cells(iCt - 1, 4) Then _ ws.Cells(iCt, 1) = 1 Next iCt End Sub . |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Unique Values, not Unique Records | Excel Discussion (Misc queries) | |||
Filer for unique records and return all column data for unique rec | Excel Discussion (Misc queries) | |||
Counting unique records in a field | Excel Discussion (Misc queries) | |||
Unique Records Help | Excel Worksheet Functions | |||
unique filter results in some non-unique records. | Excel Discussion (Misc queries) |