Adding AND into my formula

eye_in_the_sky

New Member
Joined
Jan 7, 2014
Messages
10
I have a spreadsheet where I use the following array formula to search a single column and return all the corresponding values in a different column (column 2).

=INDEX(A1:F5000,SMALL(IF(D1:D5000=J2,ROW(D1:D5000)),ROW(1:1)),2)

Is there a way to use AND to add a second criteria where E1:E5000 must = L2??

I want it to search two columns for two different values, and return the corresponding value in the rows where both conditions are met.

Help... please and thank you!!!
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
In order to use the AND in your function try multiplying the two requirements...=INDEX(A1:F5000,SMALL(IF((D1:D5000=J2)*(E1:E5000=L2),ROW(D1:D5000)),ROW(1:1)),2)
 
Upvote 0
In order to use the AND in your function try multiplying the two requirements...=INDEX(A1:F5000,SMALL(IF((D1:D5000=J2)*(E1:E5000=L2),ROW(D1:D5000)),ROW(1:1)),2)


IT WORKS!!!!!!!!!
Thank you SOOOO much!!!!
I tried this earlier but I must have typed it wrong (no surprise there) because it returned an error. This site rocks!
 
Upvote 0

Forum statistics

Threads
1,214,899
Messages
6,122,155
Members
449,068
Latest member
shiz11713

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