Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default vLookup a portion of a no. in a cell

Can I do a vlookup on the 1st 2 no. of a 6 digits no.? Eg.
Table 1
Postal Code Area
200455 ?

Table 2
Postal Code Area
20 A
I want table 1 to reflect A
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default vLookup a portion of a no. in a cell

Maybe something like this:

=VLOOKUP(--LEFT(A2,2),Table2,2,0)

--
Biff
Microsoft Excel MVP


"kattay" wrote in message
...
Can I do a vlookup on the 1st 2 no. of a 6 digits no.? Eg.
Table 1
Postal Code Area
200455 ?

Table 2
Postal Code Area
20 A
I want table 1 to reflect A



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default vLookup a portion of a no. in a cell

Hi, thanks. It worked.
I guess the 2 in "--LEFT(A2,2)" refers to the no. of digits I want to
lookup. What about "--", does it denotes anything?

"T. Valko" wrote:

Maybe something like this:

=VLOOKUP(--LEFT(A2,2),Table2,2,0)

--
Biff
Microsoft Excel MVP


"kattay" wrote in message
...
Can I do a vlookup on the 1st 2 no. of a 6 digits no.? Eg.
Table 1
Postal Code Area
200455 ?

Table 2
Postal Code Area
20 A
I want table 1 to reflect A




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default vLookup a portion of a no. in a cell

I guess the 2 in "--LEFT(A2,2)" refers to the no.
of digits I want to lookup


Yes

What about "--", does it denotes anything?


The LEFT function is a text function and as such returns a *TEXT* value. The
double unary is one method of coercing the text result of 20 to the numeric
result of 20 so that you have matching data types between the lookup value
and the data in the lookup table.

TEXT 20 and numeric 20 aren't the same to Excel.

--
Biff
Microsoft Excel MVP


"kattay" wrote in message
...
Hi, thanks. It worked.
I guess the 2 in "--LEFT(A2,2)" refers to the no. of digits I want to
lookup. What about "--", does it denotes anything?

"T. Valko" wrote:

Maybe something like this:

=VLOOKUP(--LEFT(A2,2),Table2,2,0)

--
Biff
Microsoft Excel MVP


"kattay" wrote in message
...
Can I do a vlookup on the 1st 2 no. of a 6 digits no.? Eg.
Table 1
Postal Code Area
200455 ?

Table 2
Postal Code Area
20 A
I want table 1 to reflect A






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
Extract portion of a cell Secret Squirrel Excel Discussion (Misc queries) 4 October 26th 08 05:24 AM
Formula to multiply only a portion of a cell number? zsboppie Excel Worksheet Functions 4 June 3rd 08 10:06 PM
A formula for moving a portion of a cell??? McKenna Excel Discussion (Misc queries) 4 February 20th 07 10:23 PM
return a portion of data entered into a cell Brian Excel Discussion (Misc queries) 1 January 9th 07 03:46 AM
formaula used to abstract portion of a cell to another cell CC Excel Worksheet Functions 4 October 11th 06 06:49 PM


All times are GMT +1. The time now is 01:13 AM.

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

About Us

"It's about Microsoft Excel"