M
musicgold via OfficeKB.com
Hi,
I am trying to transfer the contents of an array into a range of Excel (red
line in the code below). Though I am able to do that when the array has
values, however, it is giving me an error when the array has formulas.
How can I get this to work?
VBA Code:
...
Dim Vma As Variant
...
TotalRows = .Range("Spread").Count
Vma = Application.Transpose(.Range("Spread"))
For i = TotalRows To 1 Step -1
Vma(i) = "=RC[-2]- RC[-1])"
Next
.Range("Spread") = Application.WorksheetFunction.Transpose(Vma)
...
Thanks,
MG.
I am trying to transfer the contents of an array into a range of Excel (red
line in the code below). Though I am able to do that when the array has
values, however, it is giving me an error when the array has formulas.
How can I get this to work?
VBA Code:
...
Dim Vma As Variant
...
TotalRows = .Range("Spread").Count
Vma = Application.Transpose(.Range("Spread"))
For i = TotalRows To 1 Step -1
Vma(i) = "=RC[-2]- RC[-1])"
Next
.Range("Spread") = Application.WorksheetFunction.Transpose(Vma)
...
Thanks,
MG.