Match multiple values for a date to a single value date

  • Thread starter Thread starter RJG
  • Start date Start date
R

RJG

I have data for a year of patient visits that I want to match to the
on-call Doc for that date

Sheet 1 pt and visit date

Sheet 2 date and doc on call

My problem is that there are multiple patients for each date

I would like to create a column in sheet 1 that has the doc on call for
each patient

in english (more or less)

if [(worksheet1 cell a1)=(date x)] then [worksheet 1 cell b1=(worksheet
2 docOnCall for Date x)]

date x exists in both worksheets, but is a unique value in worksheet 2,
can occur multiple times in worksheet 1

Can anybody help me translate this into an excel function?

THanks in advance

RG
 
Put this in C1 of Sheet1:

=VLOOKUP(B1,Sheet2!A:B,2,0)

Then copy this down as far as you need to.

Hope this helps.

Pete
 
Works like a charm - thanks
RG

Pete_UK said:
Put this in C1 of Sheet1:

=VLOOKUP(B1,Sheet2!A:B,2,0)

Then copy this down as far as you need to.

Hope this helps.

Pete

I have data for a year of patient visits that I want to match to the
on-call Doc for that date

Sheet 1 pt and visit date

Sheet 2 date and doc on call

My problem is that there are multiple patients for each date

I would like to create a column in sheet 1 that has the doc on call for
each patient

in english (more or less)

if [(worksheet1 cell a1)=(date x)] then [worksheet 1 cell b1=(worksheet
2 docOnCall for Date x)]

date x exists in both worksheets, but is a unique value in worksheet 2,
can occur multiple times in worksheet 1

Can anybody help me translate this into an excel function?

THanks in advance

RG
 
Back
Top