Search multiple results with 2 conditions

EzequielE

New Member
Joined
Apr 25, 2017
Messages
2
Hello, im new in this community. I search all around the posts of this forum trying to search my question, but i couldnt. Here is what I need to do:
nXtlZRh.png

In the image, we can see the first lookup (which content is agencia4), have 2 results. In the right LOOKUP, I want that the formula give me back all the results as posible, Using the 2 variables (Date and Agencia)(which now content is Agencia4 & 13-7)

Here is the formula I've used to make the first LOOKUP:
=ArrayFormula(IF(ISERROR(INDEX($A$1:$C$8;SMALL(IF($B$1:$B$8=$F$1;ROW($B$1:$B$8));ROW(1:1));2));"";INDEX($B$1:$C$8;SMALL(IF($B$1:$B$8=$F$1;ROW($B$1:$B$8));ROW(1:1));2)))

This formula is put in cell F2, and copied cell by cell in all column F.

I'd apreciate a quick and correct answer, its very important for my work!
Many Thanks,
Ezequiel
(Sorry if I've wrote anything wrong, my first language is spanish!)
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
1. In F2 enter and copy down...

=ArrayFormula(IFERROR(INDEX($C$1:$C$8;SMALL(IF($B$1:$B$8=$F$1;ROW($C$1:$C$8)-ROW($C$1)+1);ROWS($F$2:F2))),""))

2. In I2 enter and copy down...

=ArrayFormula(IFERROR(INDEX($C$1:$C$8;SMALL(IF($B$1:$B$8=$I$1;IF($A$1:$A$8=$J$1;ROW($C$1:$C$8)-ROW($C$1)+1));ROWS($I$2:I2))),""))
<strike>
</strike>
 
Upvote 0
Many thanks for your response! But im getting this in all the cells where I put the formula; #ERROR! Any idea on how to resolve it? Thanks!! Also, I need 1 result for each consult. Mix both Agencia4 and 13-7 for example in an only cell.
 
Upvote 0
Many thanks for your response! But im getting this in all the cells where I put the formula; #ERROR! Any idea on how to resolve it? Thanks!! Also, I need 1 result for each consult. Mix both Agencia4 and 13-7 for example in an only cell.

The formula should work as advertised, unless there is no IFERROR in Google Sheets.

You could repost the sample the image in post #1 depicts in a Excel readable form for further scrutiny.
 
Upvote 0

Forum statistics

Threads
1,224,825
Messages
6,181,190
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top