There are three sheets:

- The master sheet
- The 2020 figures
- The 2021 figures

The layout of the 2020 and 2021 sheets is like this:

Figure 1 showing codes in column A. In column B is a count of the total number of occurrences in that year using a simple COUNTA function.

My resuest is for a formula on the master sheet which currently looks like this:

Figure 2 showing the codes in column A. In column B is a count of the total number of occurences accross years, this is gained by adding the corresponding value in column D (the year 1 count) to the value in column F (the year 2 count).

Currently I have to manually enter the year 2 values to update them after working with the 2021 sheet. I would like a formula in F cells that finds the row specified by column A in the sheet specified by column E, and then take and show the B value from the 2021 sheet.

Does this make sense? How do I do this?

UPDATE:

I've now tried the following VLOOKUP formula but I'm getting an error and I can't tell why it won't work:

=VLOOKUP($A29,'2021'!$A2:$A60,2)