in between pass the temporary array to the proper row with a for loop.
Frankly, I have not found any more elegant solution that would allow me to build not too big but then again not to small static tables inside the code to use with custom functions
Function fID_in(OD_in, SCHED)
Dim arrSCHED As Variant
Dim arrOD As Variant
Dim arrID(12, 40) As Variant
Dim arrTemp As Variant
Dim i, SCHEDpointer
arrSCHED = Array("STD", "XS", "XXS", "SCH10", "SCH30", "SCH40", "SCH60",
"SCH80", "SCH100", "SCH120", "SCH140", "SCH160")
arrOD = Array(0.125, 0.25, 0.5, 0.75, 1, 1.5, 2, 2.5, 3, 4, 6, 8, 10, 12, _
14, 16, 18, 20, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, _
52, 56, 60, 64, 68, 72, 76, 80, 81)
'0: STD
arrTemp = Array(0.269, 0.364, 0.622, 0.824, 1.049, 1.61, 2.067, 2.469, _
3.068, 4.026, 6.065, 7.981, 10.02, 12, 13.25, 15.25, 17.25, 19.25, _
23.25, 25.25, 27.25, 29.25, 31.25, 33.25, 35.25, 37.25, 39.25, 41.25, _
43.25, 45.25, 47.25, 51.25, 55.25, 59.25, 63.25, 67.25, 71.25, 75.25, _
79.25, "Diam>80!")
For i = LBound(arrTemp) To UBound(arrTemp): arrID(0, i) = arrTemp(i): Next i
'1: XS
arrTemp = Array(0.215, 0.302, 0.546, 0.742, 0.957, 1.5, 1.939, 2.323, _
2.9, 3.826, 5.761, 7.625, 9.75, 11.75, 13, 15, 17, 19, 23, 25, 27, _
29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 51, 55, 59, 63, 67, 71, 75, _
79, "Diam>80!")
For i = LBound(arrTemp) To UBound(arrTemp): arrID(1, i) = arrTemp(i): Next i
'2: etc... (e.g. in my case it goes on to define 12 rows)
office/vbaordotnet/visual-basic. Office VBA is what you're using in Excel. dotnet visual basic is refering to VB.NET, the language that was made for the .Net framework, a "successor" to Visual Basic Script.