VLOOKUP

T

terilad

Hi,

Is there any way that VLOOKUP can lookup 2 cells to report data back,
example, I have a table of staff names that can work on certain days of the
week per dayshift and per nightshift, I am needing to input a date into a
cell and the N/S or D/S into another cell and I need the staff names to be
input into cells that can work on each of the dates either N/S or D/S, can
this be done or is there some other function that I can use?

Any help would be great.

Many thanks

Mark
 
A

arjen van der wal

Hi Mark,

Are you trying to do this via VBA or just a formula? If a formula is
sufficient you can just concatenate two VLOOKUPS. Try something like this:

=VLOOKUP("0022",A1:E19,2,FALSE)&" " &VLOOKUP("0022",A1:E19,3,FALSE)

This will leave a space between the two values (hence the " ").
If you wanted to do it programmatically, the same concept should work.
 
T

terilad

This is not working for me, I am using only function not VBA, I get a #N/A in
the cell that I need the data to report.

I input a date into cell A1 and then I input D/S into cell A2, what I need
is the table of names to be put into cells A2 to A10, my table is set up as:

A11 B11 C11 D11 and so on to L11
Date D/S Name Name
Date N/S Name Name

Can you give me any ideas?

Many thanks


Mark
 
D

dan dungan

Hi Mark,

Seeing "Name" in several cells in one row, leads me to think that the
table structure needs to be normalized.

To understand your situation better, here are some questions.

What is the file layout for your Name table?
How many tables are you using?
How do you know if a person can work night or day shifts?
Can a person work night shift one day and day shift another?
How many days dan a person work in one week?
What do you want to accomplish by using the vlookup function?

Thanks,

Dan
 

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

Similar Threads

Excel Is this possible?? 3
Calendar entries 1
Staff Rota Template? 2
Vlookup finance help please 14
VLookup problem 1
Formula for CF 7
Another Vlookup for VBA question 4
Making cells mandatory to fill in 6

Top