Hello,
Brand new problem has arisen and I've spent two days trying to work it out. The problem being I am trying to find duplicates within a single column (col A) (which I have succesfully done) once I have found the duplicates I am then trying to work out if grid references attached to the ID in col A are duplicated themselves.
For example ID 12345678 is repeated three times due to 3 intersects against water however 2 intersects are close together that they share the same grid references meanwhile the third intersect has its only unique grid reference due to distance.
Here is an extract from my spreadsheet in non formula view:
[TABLE="class: grid, width: 1000, align: center"]
[TABLE="width: 77"]
ID
[/TABLE]
X
Y
Con
Lookup
Pon Lookup
Checked
Intersect
Completed entry?
Duplicate
Addiotional intersect?
[TABLE="width: 77"]
363964822
[/TABLE]
151815
[TABLE="width: 49"]
32546
[/TABLE]
[TABLE="width: 151"]
3639648221518132545
[/TABLE]
[TABLE="width: 151"]
#N/A
[/TABLE]
[TABLE="width: 151"]
363964822
[/TABLE]
Y
Y
Y
N
[TABLE="width: 77"]
363611803
[/TABLE]
158801
33112
[TABLE="width: 151"]
[TABLE="width: 151"]
3636118031588037559
[/TABLE]
[/TABLE]
[TABLE="width: 151"]
[TABLE="width: 151"]
3636118031588037559
[/TABLE]
[/TABLE]
[TABLE="width: 151"]
[TABLE="width: 151"]
363611803
[/TABLE]
[/TABLE]
Y
Y
N
N
[TABLE="width: 77"]
363611805
[/TABLE]
161140
[TABLE="width: 49"]
39994
[/TABLE]
[TABLE="width: 151"]
[TABLE="width: 151"]
3636118051611439994
[/TABLE]
[/TABLE]
[TABLE="width: 151"]
[TABLE="width: 151"]
3636118051611439994
[/TABLE]
[/TABLE]
[TABLE="width: 151"]
[TABLE="width: 151"]
363611805
[/TABLE]
[/TABLE]
Y
Y
Y
N
[TABLE="width: 77"]
363787342
[/TABLE]
162306
[TABLE="width: 49"]
[TABLE="width: 49"]
34007
[/TABLE]
[/TABLE]
[TABLE="width: 151"]
[TABLE="width: 151"]
3637873421623034006
[/TABLE]
[/TABLE]
[TABLE="width: 151"]
#N/A
[/TABLE]
[TABLE="width: 151"]
363787342
[/TABLE]
Y
Y
N
N
[TABLE="width: 77"]
363611789
[/TABLE]
165700
[TABLE="width: 49"]
[TABLE="width: 49"]
41697
[/TABLE]
[/TABLE]
[TABLE="width: 151"]
[TABLE="width: 151"]
[TABLE="width: 151"]
3636117891656941697
[/TABLE]
[/TABLE]
[/TABLE]
[TABLE="width: 151"]
#N/A
[/TABLE]
[TABLE="width: 151"]
363611789
[/TABLE]
Y
Y
Y
N
[TABLE="width: 77"]
363976725
[/TABLE]
167048
[TABLE="width: 49"]
30340
[/TABLE]
[TABLE="width: 151"]
[TABLE="width: 151"]
[TABLE="width: 151"]
3639767251670430340
[/TABLE]
[/TABLE]
[/TABLE]
[TABLE="width: 151"]
3639767251670430340
[/TABLE]
[TABLE="width: 151"]
363976725
[/TABLE]
Y
Y
N
N
[TABLE="width: 77"]
363611789
[/TABLE]
166502
[TABLE="width: 49"]
42025
[/TABLE]
[TABLE="width: 151"]
3636117891665042025
[/TABLE]
[TABLE="width: 151"]
#N/A
[/TABLE]
[TABLE="width: 151"]
363611789
[/TABLE]
Y
Y
Copies its duplicated cell so in this case Y
Y
Should be Y
[TABLE="width: 77"]
363976725
[/TABLE]
167085
[TABLE="width: 49"]
30311
[/TABLE]
[TABLE="width: 151"]
3639767251670830310
[/TABLE]
[TABLE="width: 151"]
#N/A
[/TABLE]
363976725
Y
Y
Copies its duplicated cell so in this case Y
Y
Should be Y
[/TABLE]
Formula view:
[TABLE="class: grid, width: 1300, align: center"]
ID
X
Y
Con
Lookup
Pon Lookup
Checked
Intersect
Completed entry?
Duplicate
Addtional intersect
<number>
<xref>
<yref>
=CONCATENATE(A2,IF(LEN(B2=6),LEFT(B2,5),LEFT(B2,4)),IF(LEN(C2=6),LEFT(C2,5),LEFT(C2,4)))
=VLOOKUP(D2,'below 7 form extract'!K:K,1,0)
=VLOOKUP(A2,'below 7 form extract'!A:A,1,0)
<Y or N>
<Y or N>
=IF(AND(G2="N",ISBLANK(H2)),"N/A",IF(H:H="N","-",IF(ISERROR(F2),"N","Y")))
=COUNTIF($A$2:A2,A2)>1 using conditional formatting and manually typed Y where highlighted.
[/TABLE]
I'll explain the solution that I think would work (I just cannot find a correct solution that works) - IF Duplicate THEN IF Duplicate references take 1st duplicate reference and mark it as Y in additional intersect. If > 2 duplicate references then the 1st is marked as Y and the 2nd is marked as N as so on..
If this is possible then I am all ears in the meantime I shall attempt to find a solution and will post updates if applicable.
Version of Excel: 2010. VBA Newbie: Yes.