Fetch results from entire workbook according to cell value

Lux Aeterna

Board Regular
Joined
Aug 27, 2015
Messages
191
Office Version
  1. 2019
Platform
  1. Windows
Hello again :)

We've got an excel file which at the moment has two sheets. The first one has some demographics and some test results for year 2022. The second one is the sheet in which we write the test results for each person. These results are transferred through a macro the Demographics 2022 sheet. Next year we'll have a new sheet called Demographics 2023, in two years a sheet called Demographics 2024 and so on.

I was wondering if we could somehow fetch past results of a person to the Result sheet, whenever this person is tested again.

This would mean to search Demographics 2022, 2023 etc. according to the cell value in the "Results sheet" cell F6 and have those past results presented somewhere in the Results sheet, so that the supervisor can compare at a glance. Some of the participants may be tested more than once, so multiple results need to be presented in chronological order.

If that's possible, I can provide more details about the cells and ranges of the sheets.
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
This is possible using Vba
Please provide specific details
Like
1. Both sheet names
2.The sheet columns like column B or G
Do not say column "Total"
 
Upvote 0
This is possible using Vba
Please provide specific details
Like
1. Both sheet names
2.The sheet columns like column B or G
Do not say column "Total"
Thank you for your reply and sorry for getting back late!

At the moment we only have one sheet for the demographics, called 2022. Next year we'll have a new sheet called 2023, In two years 2024 and so on. Is it possible for the VBA to include future sheets that haven't been created yet?

At the moment we only have one results sheet, but I am planning to create a second one. So it will be "Results normal" and "Results abnormal". Depending on the result of each sample, we will be using one of those sheets. So I guess the VBA should be able to run on the active Results sheet only.

Fetched results should appear on the active Results sheet, columns AA, AB, AC and AD, rows 11, 12 ... to 35. Row 11 will have to show the most recent and row 35 the oldest result.

Results sheet column AA should draw data from sheet 2022, 2023 etc. column B (that's the examiner name column)
Results sheet column AB should draw data from sheet 2022, 2023 etc. column F (that's the test date column)
Results sheet column AC should draw data from sheet 2022, 2023 etc. column AM (that's the pass/fail column)
Results sheet column AD should draw data from sheet 2022, 2023 etc. column AN (that's the comment column)

Now, the unique code according to which data should be fetched to the above columns is located in Results sheet F6. I don't know if it plays any role, but that cell gets its value through a VLOOKUP function.

Tell me if you need any other info!
 
Upvote 0

Forum statistics

Threads
1,215,459
Messages
6,124,947
Members
449,198
Latest member
MhammadishaqKhan

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top