A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Lookup Vector > Lookup Value



 
 
Thread Tools Display Modes
  #1  
Old June 10th, 2005, 10:29 AM
Alec Kolundzic
external usenet poster
 
Posts: n/a
Default Lookup Vector > Lookup Value

Hi,

CABLE SIZE CAPACITY
1.5 18.0
2.5 24
4 31
6 41
10 56

When I use the Lookup Function to find a Cable Size to match the Capacity
Value, say 35, the Lookup Function returns 4, which is the Lookup Vector that
is less or equal to the Lookup Value. I need the Lookup Vector to be greater
than or equal to the Lookup Value, ie 6 in this case.

Any Ideas.

Thanks
Alec


  #2  
Old June 10th, 2005, 11:05 AM
Duke Carey
external usenet poster
 
Posts: n/a
Default

One way:

Restructure your table like so

CAPACITY CABLE SIZE Min Size
- - 1.50
18 1.50 2.50
24 2.50 4.00
31 4.00 6.00
41 6.00 10.00
56 10.00 ??


Assuming the table is in A1:C7, including the headers, use this formula

=IF(ISNA(VLOOKUP(A10,$A$2:$C$7,1,0)),VLOOKUP(A10,$ A$2:$C$7,3),VLOOKUP(A10,$A$2:$C$7,2,0))

Which basically looks for an exact match first. If it's there, it uses your
Cable Size. If not, it uses the Min Size



"Alec Kolundzic" wrote in message
...
Hi,

CABLE SIZE CAPACITY
1.5 18.0
2.5 24
4 31
6 41
10 56

When I use the Lookup Function to find a Cable Size to match the Capacity
Value, say 35, the Lookup Function returns 4, which is the Lookup Vector
that
is less or equal to the Lookup Value. I need the Lookup Vector to be
greater
than or equal to the Lookup Value, ie 6 in this case.

Any Ideas.

Thanks
Alec




  #3  
Old June 10th, 2005, 11:50 AM
mangesh_yadav
external usenet poster
 
Posts: n/a
Default


Lets say your table above is in range A1:B5, and the lookup value is in
cell A9, then use the following formula:
=INDEX(A1:A5,MATCH(A9,B1:B5,1)+IF(ISNUMBER(MATCH(A 9,B1:B5,0)),0,1))

Mangesh


--
mangesh_yadav
------------------------------------------------------------------------
mangesh_yadav's Profile: http://www.excelforum.com/member.php...o&userid=10470
View this thread: http://www.excelforum.com/showthread...hreadid=378021

  #4  
Old June 10th, 2005, 12:48 PM
Alectrical
external usenet poster
 
Posts: n/a
Default

Thanks Duke, your solution works a treat.


"Duke Carey" wrote:

One way:

Restructure your table like so

CAPACITY CABLE SIZE Min Size
- - 1.50
18 1.50 2.50
24 2.50 4.00
31 4.00 6.00
41 6.00 10.00
56 10.00 ??


Assuming the table is in A1:C7, including the headers, use this formula

=IF(ISNA(VLOOKUP(A10,$A$2:$C$7,1,0)),VLOOKUP(A10,$ A$2:$C$7,3),VLOOKUP(A10,$A$2:$C$7,2,0))

Which basically looks for an exact match first. If it's there, it uses your
Cable Size. If not, it uses the Min Size



"Alec Kolundzic" wrote in message
...
Hi,

CABLE SIZE CAPACITY
1.5 18.0
2.5 24
4 31
6 41
10 56

When I use the Lookup Function to find a Cable Size to match the Capacity
Value, say 35, the Lookup Function returns 4, which is the Lookup Vector
that
is less or equal to the Lookup Value. I need the Lookup Vector to be
greater
than or equal to the Lookup Value, ie 6 in this case.

Any Ideas.

Thanks
Alec





  #5  
Old June 10th, 2005, 01:06 PM
Domenic
external usenet poster
 
Posts: n/a
Default

Another way...

Assuming that a 'Capacity' greater than 56 is not needed, try the
following array formula that needs to be confirmed with
CONTROL+SHIFT+ENTER, not just ENTER...

=MIN(IF(B2:B6=C1,A2:A6))

....where C1 contains your 'Capacity Value'.

Hope this helps!

In article ,
"Alec Kolundzic" wrote:

Hi,

CABLE SIZE CAPACITY
1.5 18.0
2.5 24
4 31
6 41
10 56

When I use the Lookup Function to find a Cable Size to match the Capacity
Value, say 35, the Lookup Function returns 4, which is the Lookup Vector that
is less or equal to the Lookup Value. I need the Lookup Vector to be greater
than or equal to the Lookup Value, ie 6 in this case.

Any Ideas.

Thanks
Alec

  #6  
Old June 10th, 2005, 02:13 PM
Aladin Akyurek
external usenet poster
 
Posts: n/a
Default

Alec Kolundzic wrote:
Hi,

CABLE SIZE CAPACITY
1.5 18.0
2.5 24
4 31
6 41
10 56

When I use the Lookup Function to find a Cable Size to match the Capacity
Value, say 35, the Lookup Function returns 4, which is the Lookup Vector that
is less or equal to the Lookup Value. I need the Lookup Vector to be greater
than or equal to the Lookup Value, ie 6 in this case.

Any Ideas.

Thanks
Alec



If the table (A1:B6) is sorted on CAPACITY...

=INDEX($A$2:$A$6,MATCH(C2,$B$2:$B$6,1)+(LOOKUP(C2, $B$2:$B$6)C2))
  #7  
Old June 10th, 2005, 02:14 PM
Alectrical
external usenet poster
 
Posts: n/a
Default

Thanks Mangesh, your solution works a treat.

"mangesh_yadav" wrote:


Lets say your table above is in range A1:B5, and the lookup value is in
cell A9, then use the following formula:
=INDEX(A1:A5,MATCH(A9,B1:B5,1)+IF(ISNUMBER(MATCH(A 9,B1:B5,0)),0,1))

Mangesh


--
mangesh_yadav
------------------------------------------------------------------------
mangesh_yadav's Profile: http://www.excelforum.com/member.php...o&userid=10470
View this thread: http://www.excelforum.com/showthread...hreadid=378021


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
lookup vs combo box Scubaman General Discussion 4 June 7th, 2005 02:02 AM
Lookup fields on label report Howard Setting Up & Running Reports 1 June 3rd, 2004 02:43 AM
Make a field lookup dependent on the value in another field of a record? Susan A Database Design 8 May 22nd, 2004 09:10 PM
Lookup fields - what's wrong with them? NATHAN SANDERS New Users 2 May 4th, 2004 10:51 AM
multiple-condition lookup Jocelyn Worksheet Functions 4 February 26th, 2004 09:42 PM


All times are GMT +1. The time now is 11:16 PM.


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