Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Vlookup with more than 1 criteria

Dog brown 25
Dog Grey 28
Cat Blue 30
Rabbit Brown 12
Dog grey 18

Can the vlookup function be used to lookup more than one value in a row and
return a single corresponding value?

In the example below I want to return the value 25. But if I lookup "dog",
there's two and if I look up "brown" there's also two so I need to lookup dog
and brown together?

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Vlookup with more than 1 criteria

How about:-

=SUMPRODUCT((A1:A5="Dog")*(B1:B5="Brown")*(C1:C5))

You don't say what you want if you searched for Grey dogs, this would return
46

Mike

"EoinL" wrote:

Dog brown 25
Dog Grey 28
Cat Blue 30
Rabbit Brown 12
Dog grey 18

Can the vlookup function be used to lookup more than one value in a row and
return a single corresponding value?

In the example below I want to return the value 25. But if I lookup "dog",
there's two and if I look up "brown" there's also two so I need to lookup dog
and brown together?

  #3   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Vlookup with more than 1 criteria

If you want to lookup and return only the 1st match for the dual criteria

Array-entered, press CTRL+SHIFT+ENTER to confirm the formula:
=INDEX(C1:C5,MATCH(1,(A1:A5="Dog")*(B1:B5="Grey"), 0))

Based on your sample data, above will return: 28
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"EoinL" wrote:
Dog brown 25
Dog Grey 28
Cat Blue 30
Rabbit Brown 12
Dog grey 18

Can the vlookup function be used to lookup more than one value in a row and
return a single corresponding value?

In the example below I want to return the value 25. But if I lookup "dog",
there's two and if I look up "brown" there's also two so I need to lookup dog
and brown together?

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
VLOOKUP or IF with many criteria Alys Excel Worksheet Functions 2 April 17th 07 01:26 PM
vlookup with two criteria hollister22nh Excel Worksheet Functions 1 February 25th 06 02:42 PM
vlookup with two criteria hollister22nh Excel Worksheet Functions 2 February 25th 06 11:42 AM
VLOOKUP with MAX criteria tralls Excel Discussion (Misc queries) 2 October 26th 05 12:12 AM
vlookup with two criteria BJ Excel Worksheet Functions 2 March 29th 05 10:37 PM


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

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"