Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
L. S. Martin
 
Posts: n/a
Default Lookup based on 2 criteria

I need to perform a lookup based on information shown in 2 adjacent columns
(Col. A = Date, Col. B = UserID). Say the column with the information is in
column C. Have no problem looking up based on just Column A, using
VLOOKUP(look_upvalue, table_array,MATCH(lookup_value, lookup_array,
match_type), FALSE), but it stops on the first entry for the date. I need
to look up info. for a certain user ID on a given date. After looking in
Help, it looks like INDEX might work, but I don't know how to set it up.
Any help would be greatly appreciated.
Thanks,
LSM


  #2   Report Post  
Barb R.
 
Posts: n/a
Default

I've concatenated two cells together and have done a VLOOKUP on the
concatenated cells.

"L. S. Martin" wrote:

I need to perform a lookup based on information shown in 2 adjacent columns
(Col. A = Date, Col. B = UserID). Say the column with the information is in
column C. Have no problem looking up based on just Column A, using
VLOOKUP(look_upvalue, table_array,MATCH(lookup_value, lookup_array,
match_type), FALSE), but it stops on the first entry for the date. I need
to look up info. for a certain user ID on a given date. After looking in
Help, it looks like INDEX might work, but I don't know how to set it up.
Any help would be greatly appreciated.
Thanks,
LSM



  #3   Report Post  
Andy Wiggins
 
Posts: n/a
Default

This file might be a help:
http://www.bygsoftware.com/examples/...s/vlookup2.zip
It's in the "Worksheet" section on page:
http://www.bygsoftware.com/examples/examples.htm

Look up on two fields with this alternative to VLOOKUP


--
Andy Wiggins FCCA
www.BygSoftware.com
Excel, Access and VBA Consultancy
-


"L. S. Martin" wrote in message
...
I need to perform a lookup based on information shown in 2 adjacent

columns
(Col. A = Date, Col. B = UserID). Say the column with the information is

in
column C. Have no problem looking up based on just Column A, using
VLOOKUP(look_upvalue, table_array,MATCH(lookup_value, lookup_array,
match_type), FALSE), but it stops on the first entry for the date. I need
to look up info. for a certain user ID on a given date. After looking in
Help, it looks like INDEX might work, but I don't know how to set it up.
Any help would be greatly appreciated.
Thanks,
LSM




  #4   Report Post  
L. S. Martin
 
Posts: n/a
Default

Thanks Barb. I hadn't thought of trying that. I guess you concatenated the
information in the two columns in the lookup range and the two entries
you're trying to lookup?
"Barb R." wrote in message
...
I've concatenated two cells together and have done a VLOOKUP on the
concatenated cells.

"L. S. Martin" wrote:

I need to perform a lookup based on information shown in 2 adjacent

columns
(Col. A = Date, Col. B = UserID). Say the column with the information is

in
column C. Have no problem looking up based on just Column A, using
VLOOKUP(look_upvalue, table_array,MATCH(lookup_value, lookup_array,
match_type), FALSE), but it stops on the first entry for the date. I

need
to look up info. for a certain user ID on a given date. After looking

in
Help, it looks like INDEX might work, but I don't know how to set it up.
Any help would be greatly appreciated.
Thanks,
LSM





  #5   Report Post  
L. S. Martin
 
Posts: n/a
Default

Thanks - sounds like EXACTLY what I was looking for!
"Andy Wiggins" wrote in message
...
This file might be a help:
http://www.bygsoftware.com/examples/...s/vlookup2.zip
It's in the "Worksheet" section on page:
http://www.bygsoftware.com/examples/examples.htm

Look up on two fields with this alternative to VLOOKUP


--
Andy Wiggins FCCA
www.BygSoftware.com
Excel, Access and VBA Consultancy
-


"L. S. Martin" wrote in message
...
I need to perform a lookup based on information shown in 2 adjacent

columns
(Col. A = Date, Col. B = UserID). Say the column with the information is

in
column C. Have no problem looking up based on just Column A, using
VLOOKUP(look_upvalue, table_array,MATCH(lookup_value, lookup_array,
match_type), FALSE), but it stops on the first entry for the date. I

need
to look up info. for a certain user ID on a given date. After looking

in
Help, it looks like INDEX might work, but I don't know how to set it up.
Any help would be greatly appreciated.
Thanks,
LSM








  #6   Report Post  
kk
 
Posts: n/a
Default

I'm using the following array formula. You may want to try...

A1:A10 - Date
B1:B10 - User ID
C1:C10 - Information

In E1: Date to lookup
In F1: User ID to lookup

In G1
=INDEX($C$1:$C$10,MATCH(1,($A$1:$A$10=$E1)*($B$1:$ B$10=$F1),0))

Confirm it by hitting Ctrl + Shift + Enter

kk

"L. S. Martin" wrote in message
...
I need to perform a lookup based on information shown in 2 adjacent columns
(Col. A = Date, Col. B = UserID). Say the column with the information is in
column C. Have no problem looking up based on just Column A, using
VLOOKUP(look_upvalue, table_array,MATCH(lookup_value, lookup_array,
match_type), FALSE), but it stops on the first entry for the date. I need
to look up info. for a certain user ID on a given date. After looking in
Help, it looks like INDEX might work, but I don't know how to set it up.
Any help would be greatly appreciated.
Thanks,
LSM



  #7   Report Post  
kk
 
Posts: n/a
Default

I'm using the following array formula. You may want to try...

A1:A10 - Date
B1:B10 - User ID
C1:C10 - Information

In E1: Date to lookup
In F1: User ID to lookup

In G1
=INDEX($C$1:$C$10,MATCH(1,($A$1:$A$10=$E1)*($B$1:$ B$10=$F1),0))

Confirm it by hitting Ctrl + Shift + Enter

kk

"L. S. Martin" wrote in message
...
I need to perform a lookup based on information shown in 2 adjacent columns
(Col. A = Date, Col. B = UserID). Say the column with the information is in
column C. Have no problem looking up based on just Column A, using
VLOOKUP(look_upvalue, table_array,MATCH(lookup_value, lookup_array,
match_type), FALSE), but it stops on the first entry for the date. I need
to look up info. for a certain user ID on a given date. After looking in
Help, it looks like INDEX might work, but I don't know how to set it up.
Any help would be greatly appreciated.
Thanks,
LSM




  #8   Report Post  
L. S. Martin
 
Posts: n/a
Default

I can't seem to get the function to work for me. I went to VBA Editor,
created a Module and copied VLookup2 into it, then returned to the worksheet
and chose Function and filled in the blanks, but got N/A (checked to make
sure right - was). The data I'm looking up is on a different worksheet -
does that make any difference?
"L. S. Martin" wrote in message
...
Thanks - sounds like EXACTLY what I was looking for!
"Andy Wiggins" wrote in message
...
This file might be a help:
http://www.bygsoftware.com/examples/...s/vlookup2.zip
It's in the "Worksheet" section on page:
http://www.bygsoftware.com/examples/examples.htm

Look up on two fields with this alternative to VLOOKUP


--
Andy Wiggins FCCA
www.BygSoftware.com
Excel, Access and VBA Consultancy
-


"L. S. Martin" wrote in message
...
I need to perform a lookup based on information shown in 2 adjacent

columns
(Col. A = Date, Col. B = UserID). Say the column with the information

is
in
column C. Have no problem looking up based on just Column A, using
VLOOKUP(look_upvalue, table_array,MATCH(lookup_value, lookup_array,
match_type), FALSE), but it stops on the first entry for the date. I

need
to look up info. for a certain user ID on a given date. After looking

in
Help, it looks like INDEX might work, but I don't know how to set it

up.
Any help would be greatly appreciated.
Thanks,
LSM








  #9   Report Post  
L. S. Martin
 
Posts: n/a
Default

Thanks for the info. I don't understand the "1" after the MATCH, but tried
it anyway and several variations. I never could get it to work. I believe
the problem is that the information I'm looking up is on a different sheet
from the two lookup entries (though that's no problem when looking up just
one entry). Thanks for trying.
"kk" <kkchoh @ yahoo dot com wrote in message
...
I'm using the following array formula. You may want to try...

A1:A10 - Date
B1:B10 - User ID
C1:C10 - Information

In E1: Date to lookup
In F1: User ID to lookup

In G1
=INDEX($C$1:$C$10,MATCH(1,($A$1:$A$10=$E1)*($B$1:$ B$10=$F1),0))

Confirm it by hitting Ctrl + Shift + Enter

kk

"L. S. Martin" wrote in message
...
I need to perform a lookup based on information shown in 2 adjacent

columns
(Col. A = Date, Col. B = UserID). Say the column with the information is

in
column C. Have no problem looking up based on just Column A, using
VLOOKUP(look_upvalue, table_array,MATCH(lookup_value, lookup_array,
match_type), FALSE), but it stops on the first entry for the date. I need
to look up info. for a certain user ID on a given date. After looking in
Help, it looks like INDEX might work, but I don't know how to set it up.
Any help would be greatly appreciated.
Thanks,
LSM






  #10   Report Post  
kk
 
Posts: n/a
Default

It work for me. I can send you the sample workbook if you need.

"L. S. Martin" wrote in message
...
Thanks for the info. I don't understand the "1" after the MATCH, but tried
it anyway and several variations. I never could get it to work. I believe
the problem is that the information I'm looking up is on a different sheet
from the two lookup entries (though that's no problem when looking up just
one entry). Thanks for trying.
"kk" <kkchoh @ yahoo dot com wrote in message
...
I'm using the following array formula. You may want to try...

A1:A10 - Date
B1:B10 - User ID
C1:C10 - Information

In E1: Date to lookup
In F1: User ID to lookup

In G1
=INDEX($C$1:$C$10,MATCH(1,($A$1:$A$10=$E1)*($B$1:$ B$10=$F1),0))

Confirm it by hitting Ctrl + Shift + Enter

kk

"L. S. Martin" wrote in message
...
I need to perform a lookup based on information shown in 2 adjacent

columns
(Col. A = Date, Col. B = UserID). Say the column with the information is

in
column C. Have no problem looking up based on just Column A, using
VLOOKUP(look_upvalue, table_array,MATCH(lookup_value, lookup_array,
match_type), FALSE), but it stops on the first entry for the date. I need
to look up info. for a certain user ID on a given date. After looking in
Help, it looks like INDEX might work, but I don't know how to set it up.
Any help would be greatly appreciated.
Thanks,
LSM









  #11   Report Post  
malik641
 
Posts: n/a
Default


This works:

E1=Date
F1=UserID

{=INDEX($C$1:$C$10,MATCH($E$1,$A$1:$A$10,0),MATCH( $F$1,$B$1:$B$10,0))}

Array function, so press Ctrl+Shft+Enter

L. S. Martin Wrote:
I need to perform a lookup based on information shown in 2 adjacent
columns
(Col. A = Date, Col. B = UserID). Say the column with the information
is in
column C. Have no problem looking up based on just Column A, using
VLOOKUP(look_upvalue, table_array,MATCH(lookup_value, lookup_array,
match_type), FALSE), but it stops on the first entry for the date. I
need
to look up info. for a certain user ID on a given date. After looking
in
Help, it looks like INDEX might work, but I don't know how to set it
up.
Any help would be greatly appreciated.
Thanks,
LSM



--
malik641
------------------------------------------------------------------------
malik641's Profile: http://www.excelforum.com/member.php...o&userid=24190
View this thread: http://www.excelforum.com/showthread...hreadid=384559

  #12   Report Post  
LM
 
Posts: n/a
Default

Malik,
Thanks for the information. I'm afraid I still can't get it or any of
the other suggestions to work. I'm running Excel 2000 and trying create a
worksheet that will get information from several other tabs in the same
workbook. Each Tab has been sorted and has the dates in Column A and the
users in Column B. On this worksheet I am entering the date in Cell A3
(merged a,b,c) and the User in Cell D3, then in other cells I am entering
the Index/Match formulas to look up say the Hi Temp in Column G of the Tab
named DWRs. I will send an abbreviated copy of the workbook if anyone is
willing to take a look at it.
Thanks also to KK for offering a copy of his workbook.
"malik641" wrote in
message ...

This works:

E1=Date
F1=UserID

{=INDEX($C$1:$C$10,MATCH($E$1,$A$1:$A$10,0),MATCH( $F$1,$B$1:$B$10,0))}

Array function, so press Ctrl+Shft+Enter

L. S. Martin Wrote:
I need to perform a lookup based on information shown in 2 adjacent
columns
(Col. A = Date, Col. B = UserID). Say the column with the information
is in
column C. Have no problem looking up based on just Column A, using
VLOOKUP(look_upvalue, table_array,MATCH(lookup_value, lookup_array,
match_type), FALSE), but it stops on the first entry for the date. I
need
to look up info. for a certain user ID on a given date. After looking
in
Help, it looks like INDEX might work, but I don't know how to set it
up.
Any help would be greatly appreciated.
Thanks,
LSM



--
malik641
------------------------------------------------------------------------
malik641's Profile:

http://www.excelforum.com/member.php...o&userid=24190
View this thread: http://www.excelforum.com/showthread...hreadid=384559



  #13   Report Post  
malik641
 
Posts: n/a
Default


Yes I will take a look at it if you still need it....sorry I haven't
responded to this in a while...send me a PM if you can...if not, just
post back and I'll give you my e-mail
LM Wrote:
Malik,
Thanks for the information. I'm afraid I still can't get it or any of
the other suggestions to work. I'm running Excel 2000 and trying
create a
worksheet that will get information from several other tabs in the
same
workbook. Each Tab has been sorted and has the dates in Column A and
the
users in Column B. On this worksheet I am entering the date in Cell A3
(merged a,b,c) and the User in Cell D3, then in other cells I am
entering
the Index/Match formulas to look up say the Hi Temp in Column G of the
Tab
named DWRs. I will send an abbreviated copy of the workbook if anyone
is
willing to take a look at it.
Thanks also to KK for offering a copy of his workbook.
"malik641" wrote
in
message ...

This works:

E1=Date
F1=UserID


{=INDEX($C$1:$C$10,MATCH($E$1,$A$1:$A$10,0),MATCH( $F$1,$B$1:$B$10,0))}

Array function, so press Ctrl+Shft+Enter

L. S. Martin Wrote:
I need to perform a lookup based on information shown in 2

adjacent
columns
(Col. A = Date, Col. B = UserID). Say the column with the

information
is in
column C. Have no problem looking up based on just Column A,

using
VLOOKUP(look_upvalue, table_array,MATCH(lookup_value,

lookup_array,
match_type), FALSE), but it stops on the first entry for the date.

I
need
to look up info. for a certain user ID on a given date. After

looking
in
Help, it looks like INDEX might work, but I don't know how to set

it
up.
Any help would be greatly appreciated.
Thanks,
LSM



--
malik641



------------------------------------------------------------------------
malik641's Profile:

http://www.excelforum.com/member.php...o&userid=24190
View this thread:

http://www.excelforum.com/showthread...hreadid=384559



--
malik641
------------------------------------------------------------------------
malik641's Profile: http://www.excelforum.com/member.php...o&userid=24190
View this thread: http://www.excelforum.com/showthread...hreadid=384559

  #14   Report Post  
rviswesw
 
Posts: n/a
Default


Hi Friends,

I am new to excel coding. I am trying to use vlookup formula to get
data from other file which is residing in my EXCEL default directory.
Please see the Example..

I have File name called File_A which is resides in my default directory
(C:\Excel\)
I have File name called File_B and writing a vlookup formula in this
file.. the formula is like this..

=Vlookup(A1,File_A.xls!Rangename,2).

But As soon as I come out of this cell, the formula is getting change
to
=Vlookup(A1,C:\EXCEL\File_A.xls!Rangename,2).

What I want here is, I do not want to specify the path (C:\Excel\). The
formula should automatically recoganice the default path and look for
File_A file and retrive a data.. Could any one respond to my mail
please..

my email id is ..

Thanks in advance
Vish


--
rviswesw
------------------------------------------------------------------------
rviswesw's Profile:
http://www.excelforum.com/member.php...o&userid=25289
View this thread: http://www.excelforum.com/showthread...hreadid=384559

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
Conditional Lookup on Multiple Criteria TBarker Excel Worksheet Functions 1 June 22nd 05 12:28 AM
Lookup based on two criteria in 1 row BethP Excel Discussion (Misc queries) 3 April 12th 05 06:47 AM
counting cells (COUNTIF) based on two or more criteria Tricia S. Excel Worksheet Functions 10 March 17th 05 02:17 PM
conditional formula - based on 2 separate criteria andrewo-s Excel Worksheet Functions 10 March 14th 05 03:35 AM
LOOKUP value based on 2 criteria Jaye Excel Worksheet Functions 1 November 22nd 04 11:08 PM


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