Hi.
I have a collection of data which consists of several items for which I will collect based on the criteria I have specified using the For Next statement.
and here is an example of the data :
<tbody>
</tbody>
the results I want :
<tbody>
</tbody>
and here is the rough code that I use, which results are not what I want
thanks in advance for your help
I have a collection of data which consists of several items for which I will collect based on the criteria I have specified using the For Next statement.
and here is an example of the data :
A | B | |
1 | User | ID |
2 | Jhon | A |
3 | dean | B |
4 | billy | B |
5 | smith | A |
6 | lovely | A |
7 | amber | B |
8 | Lina | A |
9 | joy | B |
10 | ... | ... |
<tbody>
</tbody>
the results I want :
D | |
1 | dean |
2 | billy |
3 | amber |
4 | joy |
<tbody>
</tbody>
and here is the rough code that I use, which results are not what I want
Code:
For a = 2 To 10
If Cells(a, 2) = "B" Then
For b = 1 To 4
Cells(b, 4) = Cells(a, 1)
Next b
End If
Next a
thanks in advance for your help