Hi, how to transpose the values stored in an Array to the cells. When I tried to transpose the Array in my code I'm getting TYPE MISMATCH error.
Any help please?. Thank you
Any help please?. Thank you
VBA Code:
Dim arrAYs As Variant
Dim rng As Range
Dim row As Range
Set rng = Range("A2:B" & Range("a965536").End(xlUp).Rows.count)
For Each row In rng.Rows
''When I get the value per row in column A and B, I split them into two string by cell.address
''
arr = Split(row.Address, ":")
''This array store the values from arr = Split(row.Address, ":")
arrAYs = Format(GetDayFromWeekNumber(Range(arr(1)).Value, Range(arr(0)).Value, 7), "MM/dd/yyyy") & " - " & Format(GetDayFromWeekNumber(Range(arr(1)).Value, Range(arr(0)).Value, 7) + 6, "MM/dd/yyyy")
Next
Range("F1").Resize(UBound(arrAYs )).Value = Application.Transpose(arrAYs )