I'm still not clear what you're trying to accomplish but given your expected results it looks like you want to pivot your lookup data such that each job type is a column that sums the invoices by date. In that case you want to use a pivot. In Excel you have to create a pivot table.
- Insert a PivotTable
- Select your dataset rows from the headers to the end of the table.
- In the wizard set the columns to use for the pivot.
- Drag and drop the
Job Date
column to the Rows field since each day is a separate row. - Drag and drop the
Job Type
column to the Columns field since you want to pivot and create a column for each type. - Drag and drop the
#Invoices
column to the Values field since this is what you want to aggregate.
- Drag and drop the
Excel generates a pivot table containing the data that I believe you want. You can customize it from there if desired.