Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi,
Iwant to take an array and put the values into excel, i tried this but it doesn't seem to work: For i = 1 To 3 For j = 1 To 3 t3(i, j) = Rnd Next j Next i Sheets("Sheets2").Range("A2:C4").Value =Application.WorksheetFunction.Transpose(t3) Does anyone know how to fix this? Thanks for your help. |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
You code worked for me when I declared my variables.
Option Explicit Sub testme01() Dim t3(1 To 3, 1 To 3) As Double Dim i As Long Dim j As Long For i = 1 To 3 For j = 1 To 3 t3(i, j) = Rnd Next j Next i Sheets("Sheet2").Range("A2:C4").Value _ = Application.WorksheetFunction.Transpose(t3) End Sub And are you sure you spelled the name of the worksheet correctly? Jeff wrote: Hi, Iwant to take an array and put the values into excel, i tried this but it doesn't seem to work: For i = 1 To 3 For j = 1 To 3 t3(i, j) = Rnd Next j Next i Sheets("Sheets2").Range("A2:C4").Value =Application.WorksheetFunction.Transpose(t3) Does anyone know how to fix this? Thanks for your help. -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Yes you are right -
I spelled it wrong! Thanks "Dave Peterson" wrote: You code worked for me when I declared my variables. Option Explicit Sub testme01() Dim t3(1 To 3, 1 To 3) As Double Dim i As Long Dim j As Long For i = 1 To 3 For j = 1 To 3 t3(i, j) = Rnd Next j Next i Sheets("Sheet2").Range("A2:C4").Value _ = Application.WorksheetFunction.Transpose(t3) End Sub And are you sure you spelled the name of the worksheet correctly? Jeff wrote: Hi, Iwant to take an array and put the values into excel, i tried this but it doesn't seem to work: For i = 1 To 3 For j = 1 To 3 t3(i, j) = Rnd Next j Next i Sheets("Sheets2").Range("A2:C4").Value =Application.WorksheetFunction.Transpose(t3) Does anyone know how to fix this? Thanks for your help. -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
defintion of array function | Excel Discussion (Misc queries) | |||
How to multiply all cells in array by factor | Excel Discussion (Misc queries) | |||
Transpose words and numbers into array of different proportions | Excel Discussion (Misc queries) | |||
Problem with Vlookup array selection | Excel Worksheet Functions | |||
VBA Import of text file & Array parsing of that data | Excel Discussion (Misc queries) |