B
bagsakan
Hi,
im new at excel+vba scripting because the person maintaining ou
scripts just packed up and left.
anyway all i want to do is to make sure that certain columns do no
have duplicate entries, and if there are then i want to notify the use
of their locations.
basically here is what i got
i am currently doing this on a test workbook. if i move the column
to be checked to another column (say column B) and update the 'After
parameter to reflect the change then the macro doesnt work anymore.
can somebody point out what i am doing wrong? thanks.
regards..
im new at excel+vba scripting because the person maintaining ou
scripts just packed up and left.
anyway all i want to do is to make sure that certain columns do no
have duplicate entries, and if there are then i want to notify the use
of their locations.
basically here is what i got
For counter = 1 To LastRow(ThisWorkbook.ActiveSheet)
Dim found As Long
st1 = Range("A" & counter)
found = Cells.Find(What:=st1, _
After:=Range("A" & counter), _
Lookat:=xlPart, _
LookIn:=xlFormulas, _
SearchOrder:=xlByRows, _
SearchDirection:=xlPrevious, _
MatchCase:=False).Row
Dim message1 As String
If found >= 0 And found <> counter Then
message1 = "Found " & st1 & " in " & Str(found)
Else
message1 = st1 & " of row " & Str(counter) & " not found"
End If
Cells(counter, 3).Value = message1
Next
i am currently doing this on a test workbook. if i move the column
to be checked to another column (say column B) and update the 'After
parameter to reflect the change then the macro doesnt work anymore.
can somebody point out what i am doing wrong? thanks.
regards..