What I have is a spreadsheet with over 100 tabs with relatively the same format of data, but some sheets have more or less rows than others. I have a sheet named EMP_NUM with all employee numbers and names. I have a Master sheet that I would like all the relative data copied to the Master sheet. The employee numbers listed on sheet EMP_NUM match the names of the 100+ sheets. In the end, I would like each row on the Master sheet to have the first cell to be the employee number, then the remaining cells in the row be the data collected from all the other sheets.
The employee# sheet's data that needs to be copied starts at A4 and ends at TX where X equals the greatest row number in columnA that still has a value.
I was thinking of using the data in the EMP_NUM to be called in the procedure to find the correct sheet for copying the data since they would match, but also to use as the first cell in the row.
Once I am done, I can add my formulas to calculate the data. It's been over 6 years since I dabbled a teeny tiny bit in VB in Excel, and I'm not sure what to do. Thank you all for your help!! Please let me know if I need to clear anything up.
**ADDED**
I would imagine the first step is to find the first sheet to copy data from. To find the first sheet the function should go to the EMP_NUM sheet and see what the first number is, that number relates exactly to the name of the sheet we want. That can be intEmpNum
Then on the corresponding sheet, I figure out how many rows past row 4 has data. These rows would be the range to copy. Copy this range at the first available row on sheet Master starting at Column B leaving column A blank for now. Column A is for the intEmpNum for all rows that have data in Column B but not Column A.
Then find the next employee number on EMP_NUM and repeat the process until there are no more employee numbers in column A on sheet Emp_NUM
This is what I have so far -
Sub Button1_Click()
Dim intEmpNum As Integer 'employee number
Dim strEmpCell As String 'row that employee number is in
strEmpCell = 1
Do Until Sheets("EMP_NUM").Range("A" + strEmpCell).Value = 0
intEmpNum = Sheets("EMP_NUM").Range("A" + strEmpCell).Value
strEmpCell = strEmpCell + 1
Loop
MsgBox ("The value was not found!")
End Sub