Opslag i anden fane
Jeg havde oprindelig formuleret mit spørgsmål på Engelsk så jeg håber at det går an:In A81 I have the year 2008
In B81:M81 I have the months January->December
In A82:A91 I have names that corresponds to other sheets
In B82 I need a code that looks up specific numbers in these other sheets.
First it needs to look up the other sheet. (One of the names in A82:A91).
Then in that sheet it needs to find the right numbers given the year and month.
The other sheets look like this:
The months are only listed in B45:X45 (every second column)
The years are in the following cells:
A45=2008
A53=2009
A61=2010
A69=2011
In between these cells there are a sum of numbers in the following rows for each month:
52 for year 2008
60 for year 2008
68 for year 2008
76 for year 2008
Example:
In March 2008 the number I need to transfer to the sheet is placed in F52. The year is 2008 so the total is in row 52. The months begin in column B-> but it is only every second column.
The code should contain the following:
If there is no name in A82:A91 the result should be ""
Likewise if the sum in the other sheet is ""
It should be flexible if new names are entered in A82:A91 or the existing names are altered
In B93 I have for 2009 but the months are only listed in A81:M81. The code should also be able to handle this.
Other years follow in the same way.
