XL Pro
Board Regular
- Joined
- Apr 17, 2002
- Messages
- 249
- Office Version
- 365
- Platform
- Windows
MyReport.XLS | |||||||
---|---|---|---|---|---|---|---|
A | B | C | D | E | |||
7 | Totals | HOURS WORKED AT: | |||||
8 | For | STRAIGHT | OVER | DOUBLE | |||
9 | Job Class: | Template | TIME | TIME | TIME | ||
10 | CMPCA | D21 | E21 | F21 | |||
11 | CLIC | F21 | G21 | H21 | |||
12 | PHPJ | CMPCA | - | - | - | ||
13 | PHPJDues | CMPCA | - | - | - | ||
14 | JRNFUS | CMPCA | - | - | - | ||
15 | PHF | CLIC | - | - | - | ||
Totals |
Column A has the sheet names
Column B has the type of template
Rows 10/11 has the type of template/ranges to reference.
the formulas in C12:E15 looks as such:
Code:
=IF(ISERROR(INDIRECT($A13&"!"&VLOOKUP($B13,$B$10:$AA$11,COLUMN(B$1),FALSE))),0,INDIRECT($A13&"!"&VLOOKUP($B13,$B$10:$AA$11,COLUMN(B$1),FALSE)))
I need to reference the cells in row 10 or 11 in the sheet in column A based on the template in column B.
Is this the best formula, or can it be better written. I'm specifically looking at the VLOOKUP() part of the formula.