#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default V LOOKUP

Hi, I've been trying to find a solution to this all day. Any help to get me
past this would be much appreciated.

Using VLOOKUP, I have a car license plate e.g. AB51 DVL.
On a separate worksheet I have a table with the CODE (51 etc) in one column
and the DATE (e.g. Sept 2001) in the next. I need to create a VLOOKUP so that
when a licence plate is entered, the date that corresponds to the code in
that licence plate is displayed in the correct cell. When I type in the "51"
in the VLOOKUP I get the correct answer, but when I type the cell (e.g.A3)
where the licence plate is I get #N/A. I have tried to use MID function, for
example =MID(A3,3,2) which extracts the number from the licence plate into
another cell and have used that cell as reference, but I still get the #N/A.
Any help would be much appreciated. Thanks in advance.
--
Business Computing Student

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default V LOOKUP

Hi,

Mid is extracting 51 as a text string and your comparing it to a number on
your oyher sheet. Add 0 to the lookup value to turn that into a number and
all should be fine

=VLOOKUP(MID(A3,3,2)+0,Sheet2!A1:B11,2,FALSE)

Mike

"twins160" wrote:

Hi, I've been trying to find a solution to this all day. Any help to get me
past this would be much appreciated.

Using VLOOKUP, I have a car license plate e.g. AB51 DVL.
On a separate worksheet I have a table with the CODE (51 etc) in one column
and the DATE (e.g. Sept 2001) in the next. I need to create a VLOOKUP so that
when a licence plate is entered, the date that corresponds to the code in
that licence plate is displayed in the correct cell. When I type in the "51"
in the VLOOKUP I get the correct answer, but when I type the cell (e.g.A3)
where the licence plate is I get #N/A. I have tried to use MID function, for
example =MID(A3,3,2) which extracts the number from the licence plate into
another cell and have used that cell as reference, but I still get the #N/A.
Any help would be much appreciated. Thanks in advance.
--
Business Computing Student

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default V LOOKUP


Hi,
your problem is probably due to the fact that in your code column you
have numbers, whilst the MID function will give a string
Reapplay your vlookup as follows =vlookup(mid(a3,3,2)*1,range,colnr)
This should help you through

HTH

twins160;326623 Wrote:
Hi, I've been trying to find a solution to this all day. Any help to get
me
past this would be much appreciated.

Using VLOOKUP, I have a car license plate e.g. AB51 DVL.
On a separate worksheet I have a table with the CODE (51 etc) in one
column
and the DATE (e.g. Sept 2001) in the next. I need to create a VLOOKUP
so that
when a licence plate is entered, the date that corresponds to the code
in
that licence plate is displayed in the correct cell. When I type in the
"51"
in the VLOOKUP I get the correct answer, but when I type the cell
(e.g.A3)
where the licence plate is I get #N/A. I have tried to use MID
function, for
example =MID(A3,3,2) which extracts the number from the licence plate
into
another cell and have used that cell as reference, but I still get the
#N/A.
Any help would be much appreciated. Thanks in advance.
--
Business Computing Student



--
Pecoflyer

Cheers -
*'Membership is free' (http://www.thecodecage.com)* & allows file
upload -faster and better answers

*Adding your XL version* to your post helps finding solution faster
------------------------------------------------------------------------
Pecoflyer's Profile: http://www.thecodecage.com/forumz/member.php?userid=14
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=91260

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,104
Default V LOOKUP

I have this starting in A1 of Sheet2
code date
45 Mar-01
46 Apr-01
47 May-01
48 Jun-01
49 Jul-01
50 Aug-01
51 Sep-01
52 Oct-01
53 Nov-01


In A1 of Sheet 1 I have AB51 DVL
In B1 I have =VLOOKUP(--MID(A1,3,2),Sheet2!A2:B10,2,FALSE)
Not the double negation to convert the teat value 51 into a numeric value
The result is as expected when I format B1 to show dates (on sheet2 the
dates is actually 1-Mar-2001, 1-Apr-2001, etc)
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"twins160" wrote in message
...
Hi, I've been trying to find a solution to this all day. Any help to get
me
past this would be much appreciated.

Using VLOOKUP, I have a car license plate e.g. AB51 DVL.
On a separate worksheet I have a table with the CODE (51 etc) in one
column
and the DATE (e.g. Sept 2001) in the next. I need to create a VLOOKUP so
that
when a licence plate is entered, the date that corresponds to the code in
that licence plate is displayed in the correct cell. When I type in the
"51"
in the VLOOKUP I get the correct answer, but when I type the cell (e.g.A3)
where the licence plate is I get #N/A. I have tried to use MID function,
for
example =MID(A3,3,2) which extracts the number from the licence plate into
another cell and have used that cell as reference, but I still get the
#N/A.
Any help would be much appreciated. Thanks in advance.
--
Business Computing Student



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default V LOOKUP

If you type 51 into a cell, then unless you have preformatted the cell as
text the 51 will be stored as a number. If you extract 51 with the MID
function it will be text. The data range in which you are doing the lookup
is presumably stored as numbers, so the text won't be found.
If you want to convert the text to numbers, change =MID(A3,3,2) to
=--MID(A3,3,2)
--
David Biddulph

"twins160" wrote in message
...
Hi, I've been trying to find a solution to this all day. Any help to get
me
past this would be much appreciated.

Using VLOOKUP, I have a car license plate e.g. AB51 DVL.
On a separate worksheet I have a table with the CODE (51 etc) in one
column
and the DATE (e.g. Sept 2001) in the next. I need to create a VLOOKUP so
that
when a licence plate is entered, the date that corresponds to the code in
that licence plate is displayed in the correct cell. When I type in the
"51"
in the VLOOKUP I get the correct answer, but when I type the cell (e.g.A3)
where the licence plate is I get #N/A. I have tried to use MID function,
for
example =MID(A3,3,2) which extracts the number from the licence plate into
another cell and have used that cell as reference, but I still get the
#N/A.
Any help would be much appreciated. Thanks in advance.
--
Business Computing Student





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default V LOOKUP

Thank you all ever so much, I knew I was missing something out. It works
perfectly now with the =--MID(A3,3,2) .

Business Computing Student




  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default V LOOKUP

Glad it helped.
--
David Biddulph

"twins160" wrote in message
...
Thank you all ever so much, I knew I was missing something out. It works
perfectly now with the =--MID(A3,3,2) .

Business Computing Student



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Lookup looks to the prior column if zero appears in the lookup col kenbquik Excel Discussion (Misc queries) 2 March 12th 09 03:41 AM
Matrix lookup/mulitple criteria lookup MarkFranklin Excel Discussion (Misc queries) 3 March 31st 08 10:15 AM
Get Cell Address From Lookup (Alternative to Lookup) ryguy7272 Excel Worksheet Functions 12 September 28th 07 10:36 PM
Join 2 Lists - Lookup value in 1 list & use result in 2nd lookup JBush Excel Worksheet Functions 3 January 3rd 07 11:14 PM
Pivot table doing a lookup without using the lookup function? NGASGELI Excel Discussion (Misc queries) 0 August 2nd 05 05:08 AM


All times are GMT +1. The time now is 09:51 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"