View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Arvi Laanemets
 
Posts: n/a
Default Lookup Two Columns

Hi

When the return value is a number, then (assuming source table is on sheet
Data, searched ID is in cell A2, and serached date in cell B2)
Pension=SUMPRODUCT(--(Data!$A$2:$A$100=A2),--(Data!$B$2:$B$100=B2),Data!$C$2:$C$100)
Union
Tax=SUMPRODUCT(--(Data!$A$2:$A$100=A2),--(Data!$B$2:$B$100=B2),Data!$D$2:$D$100)
Health=SUMPRODUCT(--(Data!$A$2:$A$100=A2),--(Data!$B$2:$B$100=B2),Data!$E$2:$E$100)


--
Arvi Laanemets
( My real mail address: arvi.laanemets<attarkon.ee )



"macshimi" wrote in message
...
I have data arranged with the first two Columns showing Employee ID and Pay
Date; the other columns show different deductions.

I need to lookup the Employee ID and then the Pay Date, once those two are
established, to look across the row to the required deduction:

Emp ID Pay Pension Union Tax Health
1 Sep-05 5 0.2 9 2
1 Oct-05 6 0.3 6 5
1 Nov-05 7 0.2 5 4
1 Dec-05 8 0.2 8 3
2 Sep-05 9 0.3 7 11
2 Oct-05 6 0.2 3 0.3
2 Nov-05 5 0.2 9 6
2 Dec-05 8 0.3 4 5

If it is not possible in this layout (the data was extracted from a
payroll
program) how do I re-arrange the data to make it accessable?

thanks in adavnce.

Charles