#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 14
Default VLOOKUP

Is there any way to to a vlookup in a table like this?
A B
1 10,000-24,999 1
2 25,000-59,999 2
3 60,000-149,999 3
4 150,000-500,000 4
..
..
10 75000

I want to look up the number in cell A10 in the list a1-a4 and return the b
column number. As you can see the problem is that a1-a4 is text - I was
trying to do something with the mid function starting at a search string
("-") with the whole thing in an array - but couldnt get anything to work.
Any ideas?
Thanks,
Yosef
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 698
Default VLOOKUP

WAAAYyyy too much work! :)

Try something like this:
Hdgs A B C
1 From Through MyValue
2 0 999 Unknown
3 1000 24999 1
4 25000 59999 2
5 60000 149999 3
6 150000 499999 4
7 500000 999999 Unknown

A10: 75000
A11: =VLOOKUP(A10,A2:C7,3,1)

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"ynissel" wrote:

Is there any way to to a vlookup in a table like this?
A B
1 10,000-24,999 1
2 25,000-59,999 2
3 60,000-149,999 3
4 150,000-500,000 4
.
.
10 75000

I want to look up the number in cell A10 in the list a1-a4 and return the b
column number. As you can see the problem is that a1-a4 is text - I was
trying to do something with the mid function starting at a search string
("-") with the whole thing in an array - but couldnt get anything to work.
Any ideas?
Thanks,
Yosef

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,311
Default VLOOKUP

You won't get too far with a formula like this, but it works for the
criteria you've provided. However, this format would only last for up to 7
nested IFs.

=IF(VALUE(A10)<VALUE(LEFT(A2,FIND("-",A2)-1)),1,IF(VALUE(A10)<VALUE(LEFT(A3,FIND("-",A3)-1)),2,IF(VALUE(A10)<VALUE(LEFT(A4,FIND("-",A4)-1)),3,4)))


"ynissel" wrote in message
...
Is there any way to to a vlookup in a table like this?
A B
1 10,000-24,999 1
2 25,000-59,999 2
3 60,000-149,999 3
4 150,000-500,000 4
.
.
10 75000

I want to look up the number in cell A10 in the list a1-a4 and return the
b
column number. As you can see the problem is that a1-a4 is text - I was
trying to do something with the mid function starting at a search string
("-") with the whole thing in an array - but couldnt get anything to work.
Any ideas?
Thanks,
Yosef



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 14
Default VLOOKUP

cant break out the range into 2 columns as its a daily feed that I get - and
I wouldnt be able to automate it. Isnt there some array function I could use?

"Ron Coderre" wrote:

WAAAYyyy too much work! :)

Try something like this:
Hdgs A B C
1 From Through MyValue
2 0 999 Unknown
3 1000 24999 1
4 25000 59999 2
5 60000 149999 3
6 150000 499999 4
7 500000 999999 Unknown

A10: 75000
A11: =VLOOKUP(A10,A2:C7,3,1)

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"ynissel" wrote:

Is there any way to to a vlookup in a table like this?
A B
1 10,000-24,999 1
2 25,000-59,999 2
3 60,000-149,999 3
4 150,000-500,000 4
.
.
10 75000

I want to look up the number in cell A10 in the list a1-a4 and return the b
column number. As you can see the problem is that a1-a4 is text - I was
trying to do something with the mid function starting at a search string
("-") with the whole thing in an array - but couldnt get anything to work.
Any ideas?
Thanks,
Yosef

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default VLOOKUP

Try this:

=INDEX(B1:B4,MATCH(A10,LEFT(A1:A4,FIND("-",A1:A4)-1)+0,1))

ctrl+shift+enter, not just enter


"ynissel" wrote:

Is there any way to to a vlookup in a table like this?
A B
1 10,000-24,999 1
2 25,000-59,999 2
3 60,000-149,999 3
4 150,000-500,000 4
.
.
10 75000

I want to look up the number in cell A10 in the list a1-a4 and return the b
column number. As you can see the problem is that a1-a4 is text - I was
trying to do something with the mid function starting at a search string
("-") with the whole thing in an array - but couldnt get anything to work.
Any ideas?
Thanks,
Yosef



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 698
Default VLOOKUP

Try this regular formula:

A11: =INDEX(B1:B4,MATCH(A10,INDEX(--LEFT(A1:A4,SEARCH("-",A1:A4)-1),0),1))

OR....this ARRAY FORMULA..(Committed with CTRL+SHIFT+ENTER, instead of
just ENTER)
A11: =INDEX(B1:B4,MATCH(A10,--LEFT(A1:A4,SEARCH("-",A1:A4)-1),1))


Does that help?
***********
Regards,
Ron

XL2002, WinXP


"ynissel" wrote:

cant break out the range into 2 columns as its a daily feed that I get - and
I wouldnt be able to automate it. Isnt there some array function I could use?

"Ron Coderre" wrote:

WAAAYyyy too much work! :)

Try something like this:
Hdgs A B C
1 From Through MyValue
2 0 999 Unknown
3 1000 24999 1
4 25000 59999 2
5 60000 149999 3
6 150000 499999 4
7 500000 999999 Unknown

A10: 75000
A11: =VLOOKUP(A10,A2:C7,3,1)

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"ynissel" wrote:

Is there any way to to a vlookup in a table like this?
A B
1 10,000-24,999 1
2 25,000-59,999 2
3 60,000-149,999 3
4 150,000-500,000 4
.
.
10 75000

I want to look up the number in cell A10 in the list a1-a4 and return the b
column number. As you can see the problem is that a1-a4 is text - I was
trying to do something with the mid function starting at a search string
("-") with the whole thing in an array - but couldnt get anything to work.
Any ideas?
Thanks,
Yosef

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 14
Default VLOOKUP

Im having trouble getting it to work. Plus I realized that I oversimplified
it - as I have data in columns b and C so sometimes I need to offset 2 and
sometimes 3 from the search in column A. any thoughts?

"Teethless mama" wrote:

Try this:

=INDEX(B1:B4,MATCH(A10,LEFT(A1:A4,FIND("-",A1:A4)-1)+0,1))

ctrl+shift+enter, not just enter


"ynissel" wrote:

Is there any way to to a vlookup in a table like this?
A B
1 10,000-24,999 1
2 25,000-59,999 2
3 60,000-149,999 3
4 150,000-500,000 4
.
.
10 75000

I want to look up the number in cell A10 in the list a1-a4 and return the b
column number. As you can see the problem is that a1-a4 is text - I was
trying to do something with the mid function starting at a search string
("-") with the whole thing in an array - but couldnt get anything to work.
Any ideas?
Thanks,
Yosef

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default VLOOKUP

Or try this one :

=LOOKUP(E1;VALUE(SUBSTITUTE(LEFT($A$1:$A$4;FIND("-";$A$1:$A
$4)-1);",";""));$C$1:$C$4)

you get the text left to the "-", then you get rid of the "," then you
transform it into a value.....and then you look it up




The value to look for is in E1 and is a numeric value...

Regards

Carlos

  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 14
Default VLOOKUP

For some reason I cant get it to work.

" wrote:

Or try this one :

=LOOKUP(E1;VALUE(SUBSTITUTE(LEFT($A$1:$A$4;FIND("-";$A$1:$A
$4)-1);",";""));$C$1:$C$4)

you get the text left to the "-", then you get rid of the "," then you
transform it into a value.....and then you look it up




The value to look for is in E1 and is a numeric value...

Regards

Carlos


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
Combine VLOOKUP and IF function so #NA isn't returned as a value from VLOOKUP buffgirl71 Excel Discussion (Misc queries) 12 November 14th 06 11:36 PM
Vlookup -=VLOOKUP(F9,LookUp1!$A$2:$B$1504,2,FALSE) MikeR-Oz New Users to Excel 1 March 22nd 06 09:01 AM
IF(a1="x",(vlookup 18K rows,2,false),(vlookup 18K,3,false)) RAM? bchilt Excel Worksheet Functions 6 January 20th 06 09:21 AM
IF(AND(val1=VLOOKUP( );val2>=VLOOKUP( );val2<=VLOOKUP( );VLOOKUP( Oso Excel Worksheet Functions 2 January 26th 05 06:56 AM
Vlookup info being used without vlookup table attached? Excel Worksheet Functions 0 January 25th 05 10:43 AM


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