Q:

After loading cells into variant, how can I get their address back?

I loaded a range of cells into a variant in order to loop through the cells as fast as possible.
However, when a cell has a certain value I want to write something into the field next to the cell with the offset method.
Can I do this? Is there some way to access the address property of my cells while they are in my variant array?

A:

I'm guessing you want to do something along these lines:
Sub varOutput()

Dim v As Variant
Dim i As Long

v = Sheet1.Range("A1:B3")
For i = 1 To 3
    If v(i, 1) = "a" Then v(i, 2) = "y"
Next i
Sheet1.Range("A1:B3") = v

End Sub

Writing your range into a variable creates an array of values in memory so you can't use Offset as there isn't an address on your sheet that it refers to. What the above code does is write the range you want to check and the range you want to output into a 2-dimensional array and writes any output values inside the array. Once it is done it outputs the entire array back into the same range.

