VBA Code to search multiple worksheets and return answer in Mastersheets


I have tried the VBA Code to search multiple worksheets and return answer in the Dashboard.I hit a glitch in setting the dataArray parameters.

The titles start of Row 7 in all worksheets, including the "Dashboard" worksheet". The number of columns is 10. Searching of data will have to start with Row 8 as shown in attached screenshot

Many thanks for your assistance in advance



I am particularly interested in this part of the coding:

'Increase size of array that will hold the data to display to its maximum possibke size ReDim datatoShowArray(1 To UBound(dataArray, 1), 1 To UBound(dataArray, 2))   'Row increment for the final data array (datatoShowArray).   j = 1 'Loop through the rows in the data range   For i = 1 To UBound(dataArray, 1)   'Check if the value in the row equals our search value If (dataArray(i, searchField) = SearchValue) Then 'MATCH FOUND! Now do something!   'Loop through the columns in the data range so as to get their values   For k = 1 To UBound(dataArray, 1)
MajorNdini Dec 21, '18 at 7:50 am
Screenshots can't be attached because they are useless. Only Excel workbooks can be attached. You can still attach a workbook to your question if you edit it. In fact, the most important part of your question seems to be in the "Discussion" which you appended. I suggest, while you edit your question you also include the code in it that has your particular interest. Within the question you can enclose it in CODE tags which make it easy to read and copy. After that you can delete your "Discussion".
Finally, you seem to refer to a subject you presume to be known, perhaps a TeachExcel lesson. Most readers of this forum don't know the lessons and wouldn't necessarily be prepared to look them up even if you would provide a link. Best, make your question self-contained.
Variatus (rep: 4382) Dec 21, '18 at 9:24 pm
Add to Discussion

Answer the Question

You must create an account to use the forum. Create an Account or Login