continued issue with countif function
You forgot some quotes:
Instead of:
For counter = 4 To 1443
Range("V" & counter).Formula = "=IF(COUNTIF(H4:H1443,H4)=1,H&counter)"
Next counter
For counter = 4 To 1443
Range("V" & counter).Formula = "=IF(COUNTIF(H4:H1443,H4)=1,H"&counter")"
Next counter
Look at the end of the line, need to end the H section add the counter
"Number" then end the formula with a parantheses between quotes.
"christopher ward" wrote:
hi all - many thanks to any reples its most appreciated although im still
having a few issues as my spreadsheet now has #NAME writen in many cells - my
code is as follows
Sub spot_duplicates()
Dim cell As Range
Dim counter As Integer
Sheets("Data").Select
Range("V4:V1443").Select
For counter = 4 To 1443
Range("V" & counter).Formula = "=IF(COUNTIF(H4:H1443,H4)=1,H&counter)"
Next counter
End Sub
--
C Ward
|