Basically I want to load a table into an Array in Google Sheets in VBA this would be easy. Then I want to search the array and find text and log the rows which that data is in.
In VBA this is what I would do.
Dim stArray(11, 1650) As String
Dim iRowLast As Int= 1650; Dim iColLast As Int = 10
Dim wsRaw as Workbook; Dim wsMap as Workbook
Set wsMap= Sheets("Map"); Set wsRaw= Sheets("Raw")
' Get the Array data from table '
For xRow = 0 To iRowLast
For yRow = 0 to iColLast
stArray(xRow, yRow) = wsRaw.Cells(xRow+1, iCol).Value
Next yRow
Next xRow
'Send data to Worksheet'
For xRow = 0 To iRowLast
For yRow = 0 to iColLast
wsMap.Cells(xRow, yRow).Value = stArray(xRow+1, iCol+1)
Next yRow
Next xRow
I tried something similar in Sheets and quickly found out that Multidimentional arrays don't exist.
I did find but don't know how to add to this array.
function Create2DArray(rows)
{
var arr = [];
for (var i=0;i<rows;i++)
{
arr[i] = [];
}
return arr;
}