Sarah12345
New Member
- Joined
- Jun 29, 2022
- Messages
- 2
- Platform
- Windows
Hi All,
I would like to create a report page which allows to user to choose the columns they want to include in a report and then specify a start and end date, click submit and this copies the relevant data and pastes it into a report page. There are multiple worksheets so I need the code to start with the first one and then run through the rest.
This is the current logic that I am working with;
- Go to the first worksheet (Can't specify a specific worksheet name as the user might change this, or add more worksheets)
- Copy the name within cell "A1" to use as a report sub-header
- Finds all the columns on the worksheet which has 'Yes' above them (This row will always be in the same position)
- Finds all the column titles on the worksheet that meets the report column criteria, copy the headers
- Finds the specific rows within the date range that the user specified (The start and end dates will be on the report worksheet, these can be in a fixed cell location)
- For each row where the data range meets the date range and the report column criteria, copy the row.
- Return the report sub-header, paste it into the report worksheet
- Insert the rows below the sub-header
- Continue with next sheet
I've attached a few images of the raw data and attached an image of the type of report that I want to create.
Ultimately the aim is to allow the workshop team to be able to enter and record all of their data they need to and run a report to capture the info they need to plan their works for the next month etc.
My biggest hurdle so far is finding the data I need based on the report columns, most code i've seen requires me to provide a specific name to look for e.g. "service_date"...
Any help or guidance to get me a bit further on my way will be appreciated!
I would like to create a report page which allows to user to choose the columns they want to include in a report and then specify a start and end date, click submit and this copies the relevant data and pastes it into a report page. There are multiple worksheets so I need the code to start with the first one and then run through the rest.
This is the current logic that I am working with;
- Go to the first worksheet (Can't specify a specific worksheet name as the user might change this, or add more worksheets)
- Copy the name within cell "A1" to use as a report sub-header
- Finds all the columns on the worksheet which has 'Yes' above them (This row will always be in the same position)
- Finds all the column titles on the worksheet that meets the report column criteria, copy the headers
- Finds the specific rows within the date range that the user specified (The start and end dates will be on the report worksheet, these can be in a fixed cell location)
- For each row where the data range meets the date range and the report column criteria, copy the row.
- Return the report sub-header, paste it into the report worksheet
- Insert the rows below the sub-header
- Continue with next sheet
I've attached a few images of the raw data and attached an image of the type of report that I want to create.
Ultimately the aim is to allow the workshop team to be able to enter and record all of their data they need to and run a report to capture the info they need to plan their works for the next month etc.
My biggest hurdle so far is finding the data I need based on the report columns, most code i've seen requires me to provide a specific name to look for e.g. "service_date"...
Any help or guidance to get me a bit further on my way will be appreciated!