kelly mort
Well-known Member
- Joined
- Apr 10, 2017
- Messages
- 2,169
- Office Version
- 2016
- Platform
- Windows
Code:
Dim e&
e=0
With Sheet1.[A2:A10]
Do
e=e+1
Loop Until IsError(Application. Match(e, .Cells,0))
End with
I am using this code , which I got from this same forum here some time ago. It's working great, now I need some adjustment.
I want to look at two columns for the numbering.
So for "test purposes", I am using column A and B.
So when I am sending data to column B for the first time, the number should be 1, but if column A is having say 1, then column B should be 2.
The goal is to make sure there is no duplicate- same numbers in both columns .
All I am looking for is a cooler way to avoid the duplicate.
Because at one point, I will send data to one column and at one point I will send to the other column.
And in those instances, my goal is to make sure I don't repeat numbers. If there is a 2 or any number in column B, that number should not come to column A, during the sending process as said above.
Thanks for reading. Kelly