Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default lookup help needed

Please see the table below

A B C
1 31 34 23
2 22 27 45
3 31 12 24
4 45 14 27
5 23 45 12

How to use lookup (or any function), which looks for value only in
column C and return the value from corresponding row in column A. Say
I want to look for "27" in column C, and if i find 27 in column C, it
should return 45 from column A.

The problem with vlookup function is that if I define my Table_array
from A1:C5, it will look for 27 in range A1:C5 and will match 27 from
cell B2 first and then would return 22. If I define my Table_array
from C1:C5, it will match 27 from row 4, but cannot return anything
from Column A because vlookup cannot return the value from outside the
range of its table_array.

I hope I am able to explain my problem. Any way to overcome it
without using VBA?

Thanks
Chatur
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default lookup help needed

VLOOK only looks up the item in the first row. You need to use match and
offset

Match will return the row number. The offset is one less than the row
number because the reference cell A1 in offset is 1. If match returns row 3
then the offset of row 3 from row 1 is two which is 3 - 1.

=OFFSET(A1,MATCH(E1,C1:C5)-1,0)

" wrote:

Please see the table below

A B C
1 31 34 23
2 22 27 45
3 31 12 24
4 45 14 27
5 23 45 12

How to use lookup (or any function), which looks for value only in
column C and return the value from corresponding row in column A. Say
I want to look for "27" in column C, and if i find 27 in column C, it
should return 45 from column A.

The problem with vlookup function is that if I define my Table_array
from A1:C5, it will look for 27 in range A1:C5 and will match 27 from
cell B2 first and then would return 22. If I define my Table_array
from C1:C5, it will match 27 from row 4, but cannot return anything
from Column A because vlookup cannot return the value from outside the
range of its table_array.

I hope I am able to explain my problem. Any way to overcome it
without using VBA?

Thanks
Chatur

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default lookup help needed

Joel,

Thanks for your input. It worked for me however, I came across
another problem. Use of match and offset has a limitation too. If I
am not able to find exact match, I want the formula to return the
approximate match. However, to find a approximate value using match,
array should be sorted and mine is not. I cannot use the sorted array
in my database.

Is there any way it can be done?

Thanks,
Chatur



On Apr 12, 10:31 pm, Joel wrote:
VLOOK only looks up the item in the first row. You need to use match and
offset

Match will return the row number. The offset is one less than the row
number because the reference cell A1 in offset is 1. If match returns row 3
then the offset of row 3 from row 1 is two which is 3 - 1.

=OFFSET(A1,MATCH(E1,C1:C5)-1,0)

" wrote:
Please see the table below


A B C
1 31 34 23
2 22 27 45
3 31 12 24
4 45 14 27
5 23 45 12


How to use lookup (or any function), which looks for value only in
column C and return the value from corresponding row in column A. Say
I want to look for "27" in column C, and if i find 27 in column C, it
should return 45 from column A.


The problem with vlookup function is that if I define my Table_array
from A1:C5, it will look for 27 in range A1:C5 and will match 27 from
cell B2 first and then would return 22. If I define my Table_array
from C1:C5, it will match 27 from row 4, but cannot return anything
from Column A because vlookup cannot return the value from outside the
range of its table_array.


I hope I am able to explain my problem. Any way to overcome it
without using VBA?


Thanks
Chatur


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 help needed Guntars Excel Worksheet Functions 2 May 23rd 09 05:39 PM
Lookup help needed Guntars Excel Worksheet Functions 1 May 22nd 09 07:08 AM
Lookup help needed Guntars Excel Worksheet Functions 3 May 22nd 09 05:27 AM
Lookup value needed Deepak Excel Discussion (Misc queries) 3 July 6th 08 03:30 AM
Lookup help needed atran Excel Worksheet Functions 1 June 22nd 05 09:24 PM


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