busdriver12
New Member
- Joined
- Apr 17, 2011
- Messages
- 20
- Office Version
- 365
I have to admit that in all the years I have been using Excel I have never had to use this function. However, I've looked at various examples over the years and had a loose understanding of it.
I have been presented with a problem at work for which I cannot find why it throws up a #N/A error. I'll keep it simple:
In a workbook I have a sign on sheet (called SignOn) consisting of 4 columns (Shift number, Driver name, Unique Staff ID and column for their signature).
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Shift[/TD]
[TD]Driver[/TD]
[TD]Staff ID[/TD]
[TD]Signature[/TD]
[/TR]
[TR]
[TD]4200[/TD]
[TD]J Bloggs[/TD]
[TD]?[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4201[/TD]
[TD]J Smith[/TD]
[TD]?[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
In a second sheet (called NAMES) - it is a simple table consisting of the drivers ID number in column A and their name in column B.
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Staff ID[/TD]
[TD]Name
[/TD]
[/TR]
[TR]
[TD]2001[/TD]
[TD]J Blogs[/TD]
[/TR]
[TR]
[TD]2052[/TD]
[TD]J Smith[/TD]
[/TR]
</tbody>[/TABLE]
In the sign on sheet I want to type in the driver's name (Col B) and use VLOOKUP to insert the driver's Staff number from the NAMES sheet into Col C. I named a range (Data) in the NAMES sheet containing the table used in the VLOOKUP formula. formula:
This throws up a #N/A error. The result I am expecting is the Staff ID for each name ("2001" and "2052" respectively) to be inserted into C2 and C3 of the SignOn sheet. I've used the Error Checking and Evaluate Formula in the Formula tab on the ribbon to try to pin down and it tells me that there data being looked up is not available (hence #N/A) to the formula, but as far as I can see it is there.
I can't help but feeling that there is a piece of logic or a crucial step I am missing.
Thanks in advance
I have been presented with a problem at work for which I cannot find why it throws up a #N/A error. I'll keep it simple:
In a workbook I have a sign on sheet (called SignOn) consisting of 4 columns (Shift number, Driver name, Unique Staff ID and column for their signature).
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Shift[/TD]
[TD]Driver[/TD]
[TD]Staff ID[/TD]
[TD]Signature[/TD]
[/TR]
[TR]
[TD]4200[/TD]
[TD]J Bloggs[/TD]
[TD]?[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4201[/TD]
[TD]J Smith[/TD]
[TD]?[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
In a second sheet (called NAMES) - it is a simple table consisting of the drivers ID number in column A and their name in column B.
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Staff ID[/TD]
[TD]Name
[/TD]
[/TR]
[TR]
[TD]2001[/TD]
[TD]J Blogs[/TD]
[/TR]
[TR]
[TD]2052[/TD]
[TD]J Smith[/TD]
[/TR]
</tbody>[/TABLE]
In the sign on sheet I want to type in the driver's name (Col B) and use VLOOKUP to insert the driver's Staff number from the NAMES sheet into Col C. I named a range (Data) in the NAMES sheet containing the table used in the VLOOKUP formula. formula:
Code:
=VLOOKUP(B2,Data,1,FALSE)
This throws up a #N/A error. The result I am expecting is the Staff ID for each name ("2001" and "2052" respectively) to be inserted into C2 and C3 of the SignOn sheet. I've used the Error Checking and Evaluate Formula in the Formula tab on the ribbon to try to pin down and it tells me that there data being looked up is not available (hence #N/A) to the formula, but as far as I can see it is there.
I can't help but feeling that there is a piece of logic or a crucial step I am missing.
Thanks in advance