I want to the daily number of hours performed by each department from a pivot table but because the types of hours and number of columns can change, I can't use the formula below. Is there a way to search by the name of the column "grand total" instead of using a fixed column, column 8 in my formula?
=INDEX($F$5:$M$12,MATCH($F$21,$F$5:$F$12,0),8)
<tbody>
</tbody>
=INDEX($F$5:$M$12,MATCH($F$21,$F$5:$F$12,0),8)
base | OT | CB-OT | Orient | Training | Inservice | Grand Total | |
CT | 8 | 1 | 1 | 8 | 2 | 25 | |
US | 16 | 5 | 21 | ||||
MRI | 24 | 8 | 32 | ||||
NM | 8 | 2 | 10 |
<tbody>
</tbody>