I have this challenge I would like some help with.
After thinking about the task at hand, I found that I do not have the right skills with VBA to get it down.
Please see the attached file.
On sheet 1, the rows represent the date in a month, and the columns represent other sheets in the workbook, with the name of the sheet in the header.
On the sheets that have a name similar to the headers, B1:D1 in the example, there are columns with month, day and hour.
I would like a subroutine that does something like this:
- Loop trough row 1 on sheet1 and check if it finds a sheet with a name corresponding to the value in the checked cell.
- If it finds a sheet - count the number of lines of each day in that sheet (1, 2, 3 [...])
- Fill in the count of items per day in the corresponding cell matching the column for the respective sheet name and the row of the counted day.
- When it is finished with the first column that matches, start from step one and repeat for each matching sheet.
I would also like to be able to add more columns that correspond to a sheet name in Sheet1 at a later stage.
Thank you so much for your help in advance!
Best regards,
Knut
Bookmarks