I am trying to sum multiple columns from a table on a separate sheet using vlookup and matching the column index number with a name instead of the column number. I can return a single result but can only seem to sum the product of the columns using the array {3,4,5} etc.

In one tab I have my data (simplified for this example)

In another sheet I want to show the totals for Fred and Bob and Betty and Jane for each category.

This returns a single result:

```
=IFERROR(VLOOKUP(($A2&""),'P&L by job'!$A$2:$E$4,MATCH($A$2,'P&L by job'!$A$1:$E$1,0),FALSE),0)
```

This formula will result in the sumproduct:

```
=IFERROR(SUMPRODUCT(VLOOKUP(($A2&""),'P&L by job'!$A$2:$E$4{2,3},FALSE)),0)
```

The issue is when an additional column is added, or the columns are in a different order each time I import the data across, I need to change the column index number in my spreadsheet.

Is there a better approach?