Match multiple values for a date to a single value 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
 
P

Pete_UK

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
 
R

RJG

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top