I want to name an array to use in a formula with Index and Match.
Specifically speaking, I have 2 Hidden sheets. Every time the spreadsheet opens, the user is prompted to select 2 files. The contents of each file will be copied onto each of the Hidden Sheets. The problem is that I don't know how to declare the array with the array size changing depending on the user selected file.
I tried this but I get an error saying that the values must be constants.
Dim HRange(1 To HRow, 1 To HCol) As String
Dim DRange(1 To DRow, 1 To DCol) As String
Dim HUnitRange(1 To HRow, HUnitCol To HUnitCol) As String
Dim HVINRange(1 To HRow, HVINCol To HVINCol) As String
Dim DUnitRange(1 To DRow, DUnitCol To DUnitCol) As String
Dim DVINRange(1 To DRow, DVINCol To DVINCol) As String
HRow, HCol, DRow, DCol are integers and the values are obtained by counting the number of rows of each user selected file.
On sheet1 I want to use as Index and Match combination referring to the User Selected files. Can someone explain to me how this can be done?
Thanks
Specifically speaking, I have 2 Hidden sheets. Every time the spreadsheet opens, the user is prompted to select 2 files. The contents of each file will be copied onto each of the Hidden Sheets. The problem is that I don't know how to declare the array with the array size changing depending on the user selected file.
I tried this but I get an error saying that the values must be constants.
Dim HRange(1 To HRow, 1 To HCol) As String
Dim DRange(1 To DRow, 1 To DCol) As String
Dim HUnitRange(1 To HRow, HUnitCol To HUnitCol) As String
Dim HVINRange(1 To HRow, HVINCol To HVINCol) As String
Dim DUnitRange(1 To DRow, DUnitCol To DUnitCol) As String
Dim DVINRange(1 To DRow, DVINCol To DVINCol) As String
HRow, HCol, DRow, DCol are integers and the values are obtained by counting the number of rows of each user selected file.
On sheet1 I want to use as Index and Match combination referring to the User Selected files. Can someone explain to me how this can be done?
Thanks