Thread: VLOOKUP
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
joel joel is offline
external usenet poster
 
Posts: 9,101
Default VLOOKUP

You can use SumProduct with F2 = month number

=SumProduct(--(G2='Oct - Dec Database'!$G$2:$G$18),--(F2='Oct - Dec
Database'!$F$2:$F$18),'Oct - Dec Database'!$I$2:$I$18)


"DianeandChipps" wrote:

I have been using a VLOOKUP formula to bring data from one worksheet to
another in the same workbook which has been working fine - up to a point.
=VLOOKUP(G2,'Oct - Dec Database'!$G$2:$Q$18,3,FALSE)
G2 is a payroll number which is unique and the third column of the array is
the number of hours they worked in a month.
Unfortunately there are three months of information, in column F, for most
staff members on the worksheet and I was wondering if there is any way for
the lookup to search for the payroll number and the month before giving an
answer.
The way I am doing it at the moment the results give the first answer for
all months. For example: Joe Bloggs works 100 in October; 125 in November;
75 in December - the answer I get is 100 for all of his months.
I hope that this makes enough sense and someone can help me.

Many thanks Diane