I have a function that reads data in an tab and returns it as an 1D array:
Public Function OneDimension(arr)
OneDimension = Application.Transpose(Application.Transpose(arr))
End Function
the function is called when the form is opened:
Set actionDict = New Scripting.Dictionary
numArrCols = Data.Columns.Count - 1
ReDim arr(1 To numArrCols) 'empty array
For Each rw In Data.rows
id = "" & rw.Cells(1).Value
If Not actionDict.Exists(id) Then
actionDict.Add id, New Collection 'new key: add key and empty collection
End If
actionDict(id).Add OneDimension(rw.Cells(2).Resize(1, numArrCols).Value) 'add the row value as 1D array
Next rw
The data looks like this:
| user id | name | date | answer | amount | comments | completed | helper |
|---|---|---|---|---|---|---|---|
| 1 | test,t | 05/22/2022 | yes | 0.01 | something | No | 144687 |
with the formula
helper = user id & date
user id is a text field, and date is stored as mm/dd/yyyy, when I run it with Office 365 it seems fine, but when my boss ran it with excel 2016 it gave this error:
runtime error 13 type mismatch
with this in the debugger:
What could be causing this?
