creativity
01-30-2015, 11:17 PM
Hi Everyone,
I have a small code which ensures that the same value is not written in the cells.
So I have a row where [in another] worksheet I have a dropdown menu and when the user selects a value from the drop down list, that value is then written in another worksheet. But what I want is that the value does not repeat in the row if it already exists.
My idea is:
Create two counters, i and j. Where i will look at the values from the left of the row and j will look at the row starting from the right of the row. Then if i = j, don't replicate the same value.
My code is:
i = Worksheets("").Cells(1,coli)
j = Worksheets("").Cells(1,coli-1)
While i<>j Then
......
Wend
So what I am not getting is how do I assign j to be a reverse counter?
Thank you
I have a small code which ensures that the same value is not written in the cells.
So I have a row where [in another] worksheet I have a dropdown menu and when the user selects a value from the drop down list, that value is then written in another worksheet. But what I want is that the value does not repeat in the row if it already exists.
My idea is:
Create two counters, i and j. Where i will look at the values from the left of the row and j will look at the row starting from the right of the row. Then if i = j, don't replicate the same value.
My code is:
i = Worksheets("").Cells(1,coli)
j = Worksheets("").Cells(1,coli-1)
While i<>j Then
......
Wend
So what I am not getting is how do I assign j to be a reverse counter?
Thank you