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

I am needing to look up data from a seperate report in which the VLOOKUP
formula will not work as there are multiple instances of the lookup value in
such. I would like to pull in specific results. Example - below is the
table_array in which I want to pull in the result where 'jim' is either "def"
or "jkl", first occurance of such is fine. is this possible with a formula?
I then want to pull in the corresponding number in column c. Any suggestions
are appreciated!

a b c
1 jim abc 123
2 jim def 456
3 andy ghi 789
4 jim jkl 101
5 jim mno 111

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default lookup with IF criteria

Try one of these formulas...

'will sum up the values of c1:c5 with matching critieras...So if there is
only one instance then this would work
=SUMPRODUCT((A1:A5="jim")*(B1:B5="def")*C1:C5)

'will return the first matching instance whatsoever
=INDEX(C1:C5,SUMPRODUCT((A1:A5="jim")*(B1:B5="def" )*ROW(C1:C5)))


--
Jacob (MVP - Excel)


"cv8497" wrote:

I am needing to look up data from a seperate report in which the VLOOKUP
formula will not work as there are multiple instances of the lookup value in
such. I would like to pull in specific results. Example - below is the
table_array in which I want to pull in the result where 'jim' is either "def"
or "jkl", first occurance of such is fine. is this possible with a formula?
I then want to pull in the corresponding number in column c. Any suggestions
are appreciated!

a b c
1 jim abc 123
2 jim def 456
3 andy ghi 789
4 jim jkl 101
5 jim mno 111

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default lookup with IF criteria

In the second formula below, would it be possible to nest an OR formula in
the 2nd part of the sumproduct formula?
=INDEX(C1:C5,SUMPRODUCT((A1:A5="jim")*(or(B1:B5="d ef",b1:b5=€jkl€))*ROW(C1:C5)))???

I have multiple criteria i am searching for and it only needs to be on of
them, but there may not be all of them, just a few of the criteria. Same
example below but say I wanted to look for "tuv", "wxy" or "def". it can be
any one of these. do i need to do an IF with numerous index formulas?

"Jacob Skaria" wrote:

Try one of these formulas...

'will sum up the values of c1:c5 with matching critieras...So if there is
only one instance then this would work
=SUMPRODUCT((A1:A5="jim")*(B1:B5="def")*C1:C5)

'will return the first matching instance whatsoever
=INDEX(C1:C5,SUMPRODUCT((A1:A5="jim")*(B1:B5="def" )*ROW(C1:C5)))


--
Jacob (MVP - Excel)


"cv8497" wrote:

I am needing to look up data from a seperate report in which the VLOOKUP
formula will not work as there are multiple instances of the lookup value in
such. I would like to pull in specific results. Example - below is the
table_array in which I want to pull in the result where 'jim' is either "def"
or "jkl", first occurance of such is fine. is this possible with a formula?
I then want to pull in the corresponding number in column c. Any suggestions
are appreciated!

a b c
1 jim abc 123
2 jim def 456
3 andy ghi 789
4 jim jkl 101
5 jim mno 111

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
Matrix lookup/mulitple criteria lookup MarkFranklin Excel Discussion (Misc queries) 3 March 31st 08 10:15 AM
LOOKUP with 2 or more criteria Tomas Excel Worksheet Functions 1 January 19th 07 08:29 PM
Lookup using more than one criteria Beccy Excel Worksheet Functions 7 May 16th 06 12:51 PM
lookup with 2 criteria LoriM Excel Discussion (Misc queries) 5 January 7th 05 05:39 PM
lookup with 2 criteria LoriM Excel Discussion (Misc queries) 0 January 5th 05 02:05 AM


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