Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Deeds
 
Posts: n/a
Default Lookup the 1st 5 digits

I am trying to ultimately do a lookup...I will word it out so as to explain
my goal....If the 1st 5 digits of the number in Cell A1 equals the 1st 5
digits of a number in a range....then bring back the corresponding flag from
the range (table) of numbers. I want it to look at a table and find the
number that begins with the same 5 digits and return it's corresponding flag
(column b).
Thanks in advance!
  #2   Report Post  
David Hepner
 
Posts: n/a
Default

Try this:

=VLOOKUP(VALUE(LEFT(A1,5)),D1:E9,2,FALSE)

D1:E9 is the range of the table

"Deeds" wrote:

I am trying to ultimately do a lookup...I will word it out so as to explain
my goal....If the 1st 5 digits of the number in Cell A1 equals the 1st 5
digits of a number in a range....then bring back the corresponding flag from
the range (table) of numbers. I want it to look at a table and find the
number that begins with the same 5 digits and return it's corresponding flag
(column b).
Thanks in advance!

  #3   Report Post  
Deeds
 
Posts: n/a
Default

It works.....Thank you very much!

"David Hepner" wrote:

Try this:

=VLOOKUP(VALUE(LEFT(A1,5)),D1:E9,2,FALSE)

D1:E9 is the range of the table

"Deeds" wrote:

I am trying to ultimately do a lookup...I will word it out so as to explain
my goal....If the 1st 5 digits of the number in Cell A1 equals the 1st 5
digits of a number in a range....then bring back the corresponding flag from
the range (table) of numbers. I want it to look at a table and find the
number that begins with the same 5 digits and return it's corresponding flag
(column b).
Thanks in advance!

  #4   Report Post  
Bob Phillips
 
Posts: n/a
Default

=IF(ISNA(MATCH(LEFT(c1,5),LEFT(A1:A10,5),0)),"No
match",INDEX(B1:A10,MATCH(LEFT(C1,5),LEFT(A1:A10,5 ),0)))

which is an array formula so commit with ctrl-shift-enter.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Deeds" wrote in message
...
I am trying to ultimately do a lookup...I will word it out so as to

explain
my goal....If the 1st 5 digits of the number in Cell A1 equals the 1st 5
digits of a number in a range....then bring back the corresponding flag

from
the range (table) of numbers. I want it to look at a table and find the
number that begins with the same 5 digits and return it's corresponding

flag
(column b).
Thanks in advance!



  #5   Report Post  
ilanr01
 
Posts: n/a
Default


Deeds Wrote:
I am trying to ultimately do a lookup...I will word it out so as to
explain
my goal....If the 1st 5 digits of the number in Cell A1 equals the 1st
5
digits of a number in a range....then bring back the corresponding flag
from
the range (table) of numbers. I want it to look at a table and find
the
number that begins with the same 5 digits and return it's corresponding
flag
(column b).
Thanks in advance!


Make a range of 3 columns:
The first tour numbers
The second enter this formula: =VALUE(TEXT((LEFT(A1,5)),0))
The third your flags
Now, if your range is in, say, D1:F3, enter this formula inyour check
cell:
=VLOOKUP(VALUE(LEFT(A1,5)),E1:F3,2,FALSE)
Ilan


--
ilanr01
------------------------------------------------------------------------
ilanr01's Profile: http://www.excelforum.com/member.php...o&userid=26797
View this thread: http://www.excelforum.com/showthread...hreadid=401156

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 more than one cell andrewm Excel Worksheet Functions 20 June 14th 05 05:33 AM
Lookup Vector > Lookup Value Alec Kolundzic Excel Worksheet Functions 6 June 10th 05 02:14 PM
Formula checking multiple worksheets sonic-the-mouse Excel Worksheet Functions 2 June 5th 05 07:48 PM
Lookup function w/Text and Year Josh O. Excel Worksheet Functions 1 February 12th 05 11:27 PM
double lookup, nest, or macro? Josef.angel Excel Worksheet Functions 1 October 29th 04 09:50 AM


All times are GMT +1. The time now is 12:52 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"