This is to locate a reference cell. The sheet has unformatted data at the top, and then a clean version of the data (blank rows removed) at the bottom. The row labels are unique, but they repeat.
What I would like to do is to create a loop that runs down column B... in garbled high level language (more c++ than vba because its what I know) something like.
for i=1, i<ws.usedrange.rows, i++
{
if (find (ws.row(i+1).value in rows(1,i)))
break
}
msgbox "first duplicate value found in row"&(i+1)
The idea is that it starts off comparing row 2 to rows 1:1, if it is not found in that range, it loops, then it compares row 3 to rows 1:2, and so on. When it first finds a duplicate in the previous range, it breaks the loop and (i+1) now equals the row of the duplicate value.
...
I am trying to learn VBA right now, so I realize my language is terrible, my project outpaces my learning, the functions and syntax are giving me trouble, and its been years since I did C++, not that it translates in every way either.
Any guidance you can give...
Bookmarks