I am trying to create a 3rd array from Array A and Array B, where Array B is contained within Array A. To keep it short I will just post the loop here, The arrays that I want are correct, I have already printed them and confirmed they are correct. It is just going somewhere wrong in my loop.
Array A: [a1, a2, a3, b1, b2, b3, c1, c2, c3]
Array B: [a1, a2, a3, b1, b3, c1, c2]
Array C (what I want): [a1, a2, a3, b1, N/A, b3, c1, c2, N/A]
I think my error is coming from where my Next i is placed. I cannot put it inside the If statement but I am not sure where it should go.
For j = 1 To UBound(EASR_VI_New)
For i = 1 To UBound(VI_VRR4)
If VI_VRR4(i, 1) = EASR_SS_VI_All(j, 1) Then
TE_VRR4E(i, 1) = TE_VRR4F(i, 1)
ElseIf VI_VRR4(i, 1) <> EASR_SS_VI_All(j, 1) Then
TE_VRR4E(i, 1) = "N/A"
End If
Next i
Next j
Currently the Array TE_VRR4E is printing all N/A, however when I print VI_VRR4 and EASR_SS_VI_All the first 3 values in each array are the exact same. So I don't know why it is giving me all N/A.


