Hi,
I saw in JWalk's 2013PPw/VBA the following macro:
I then wanted to reduce the following code in similar fashion:
So I tried this:
Problem is in each cell T103:T107 I got "=MCTSI2QuotedShareL1" instead of the five separate ones I wanted. Any idea how I can change the Array formula coding to get it right?
Thanks!
Daniel
I saw in JWalk's 2013PPw/VBA the following macro:
Code:
Sub Macro5()
ActiveCell.Resize(,6)=Array("Jan","Feb","Mar","Apr","May","Jun")
End Sub
I then wanted to reduce the following code in similar fashion:
Code:
Sub AuthorizedShare()
With ActiveWorkbook.Worksheets("Summary Quoted")
.Range("T103").Formula = "=MCTSI2QuotedShareL1"
.Range("T104").Formula = "=MCTSI2QuotedShareL2"
.Range("T105").Formula = "=MCTSI2QuotedShareL3"
.Range("T106").Formula = "=MCTSI2QuotedShareL4"
.Range("T107").Formula = "=MCTSI2QuotedShareL5"
.Range("T117").Formula = "=MCTSI2QuotedShareL1"
.Range("T118").Formula = "=MCTSI2QuotedShareL2"
.Range("T119").Formula = "=MCTSI2QuotedShareL3"
.Range("T120").Formula = "=MCTSI2QuotedShareL4"
.Range("T121").Formula = "=MCTSI2QuotedShareL5"
End With
End Sub
So I tried this:
Code:
Sub AuthorizedShare()
With ActiveWorkbook.Worksheets("Summary Quoted")
.Range("T103:T107").Formula = Array("=MCTSI2QuotedShareL1", "=MCTSI2QuotedShareL2", "=MCTSI2QuotedShareL3", "=MCTSI2QuotedShareL4", "=MCTSI2QuotedShareL5")
End With
End Sub
Problem is in each cell T103:T107 I got "=MCTSI2QuotedShareL1" instead of the five separate ones I wanted. Any idea how I can change the Array formula coding to get it right?
Thanks!
Daniel