I have a For Each....Next loop running along with a counter. Within this I have two variants that refer to different cells which vary depending on the value of the counter (+1 everytime a loop is made) and wanting to concatenate the values in the two. As in:
counter = 0
For Each c In Worksheets("Sheet1").Range("A1:A700")
Dim var1 As Variant
Dim var2 As Variant
var 1 = "A" & counter
var 2 = "B" & counter
'Need to concat values in var1 and var 2 here
counter = counter +1
Next
So if var1 = A1, and var2 = B1, i would then want to concatenate the values in those cells. But how can i concat using variants? (i.e. var1.value & " " & var2.value). Is it possible to convert the variants into strings/numerics to solve the problem?
Bookmarks