Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 53
Default Looking Up Text entries

Hi all,

No one could help me with this before so I will repost hoping it'll be
different this time. I need to lookup a value in a worksheet of data
based on 4 different criteria. I can use Vlookup for looking up data
based on 1 criteria, and I can use SUMPRODUCT to look up values based
on multiple criteria, but I need to lookup a text entry based on 4
criteria. For example, in a worksheet in Excel I have 10 columns of
data. I would like to know the name of the person who lives in the
state of New York, was born in 1980, is a male, and drives an
Oldmobile. This is really done for illustration purposes and is not
exactly what I'm looking for, but just an example of it. Can someone
please help?

Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Looking Up Text entries

Assuming you don't decide to use the suggestion that Matt has given you, you
can do something like the following.

You didn't give us your layout, so I am going to assume one. Let's say your
names are in Column A, the state is in Column B, the year is in Column C,
the gender is in Column D and the make of car is in Column E. Also assume
your data starts in Row 2 (where I'm assuming Row 1 is a header row. Further
assume the lookup criteria are placed in cells (so they can be changed in
order to perform other look ups) as follows... G1 contains the state to
search for, G2 contains the year to search for, G3 contains the gender to
search for and G4 contains the make of car to search for; then this formula
will return the name located in Column A where all criteria match those
specified in the G1:G4...

=INDEX(A2:A10000,10000-SUMPRODUCT(MIN(10000-ROW(A2:A10000)*(B2:B10000=G1)*(C2:C10000=G2)*(D2:D 10000=G3)*(E2:E10000=G4)))-1)

where I am assuming you will have no more than 10000 records maximum. If
none of your data matches the criteria specified in G1:G4, then an #VALUE!
error is returned.

Rick


wrote in message
...
Hi all,

No one could help me with this before so I will repost hoping it'll be
different this time. I need to lookup a value in a worksheet of data
based on 4 different criteria. I can use Vlookup for looking up data
based on 1 criteria, and I can use SUMPRODUCT to look up values based
on multiple criteria, but I need to lookup a text entry based on 4
criteria. For example, in a worksheet in Excel I have 10 columns of
data. I would like to know the name of the person who lives in the
state of New York, was born in 1980, is a male, and drives an
Oldmobile. This is really done for illustration purposes and is not
exactly what I'm looking for, but just an example of it. Can someone
please help?

Thanks!


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
Limiting text entries Help4me Excel Discussion (Misc queries) 7 December 4th 08 11:24 PM
Allow times OR certain text entries Horatio J. Bilge, Jr. Excel Discussion (Misc queries) 3 October 4th 07 08:37 PM
Count single Text in cells with multiple text entries WSC Excel Discussion (Misc queries) 6 January 9th 07 04:17 PM
Help with Formula for Text Entries niggle Excel Worksheet Functions 0 July 16th 05 12:13 PM
Parsing out text entries in a text box jasonsweeney[_40_] Excel Programming 17 February 9th 04 05:45 PM


All times are GMT +1. The time now is 12:23 PM.

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"