Lookup for MULTIPLE values and return a specific cell if AT LEAST ONE criteria is met

simonesk

New Member
Joined
Jun 6, 2021
Messages
2
Office Version
  1. 365
  2. 2019
  3. 2016
Platform
  1. Windows
Dear all,

I am trying to find a specific value (from multiple options) in an array (Please, see the picture below). I tried several formulas, playing with OR, HLOOKUP, INDEX and MATCH, but I couldn't find a working formula yet. It is all good if I look for a single value, but as soon as I add multiple criteria I get #VALUE or #N/A, or similar errors.

Could you be so kind to help me out with this matter?

Regards,

Simone

MyData:

Borehole Week1 Week2 Week3 Week4 Wanted output: Lookup Values: W 18/10 W 25/10 W 01/11 W 08/11
ML 110 06/10/2021 W 01/11 ML 110
ML 111 W 18/10 ML 111
ML 114 W 25/10 ML 114
ML 117 10/10/2021 11/11/2021 W 06/12
ML 119 W 08/11 ML 119
ML 120 25/10/2021 W 01/11 ML 120
ML 129 19/09/2021 22/10/2021 05/11/2021 W 06/12
 

Attachments

  • EXCEL_Spiegazione.PNG
    EXCEL_Spiegazione.PNG
    24.3 KB · Views: 27

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Hi Simone,

Maybe this, drag down the array far enough to return total count.

Book1
ABCDEFGHIJKLMN
1BoreholeWeek1Week2Week3Week4OutputCountValuesw 18/10w 25/10w 01/11w 08/11
2ML1106/10/2021W 01/11ML1105
3ML111W 18/10ML111
4ML114W 25/10ML114
5ML11710/10/202111/11/2021W 06/12ML119
6ML119W 08/11ML120
7ML12025/10/2021W 01/11 
8ML12919/09/202122/10/20215/11/2021W 06/12 
Sheet1
Cell Formulas
RangeFormula
H2H2=SUMPRODUCT(($B$2:$E$8=K1)+($B$2:$E$8=L1)+($B$2:$E$8=M1)+($B$2:$E$8=N1))
G2:G8G2=IF(ROWS($G$2:G2)>$H$2,"",INDEX($A$2:$A$8,SMALL(IF(($B$2:$E$8=$K$1)+($B$2:$E$8=$L$1)+($B$2:$E$8=$M$1)+($B$2:$E$8=$N$1),ROW($A$2:$A$8)-ROW($A$1)),ROWS($G$2:G2))))
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Last edited:
Upvote 0
Another option
+Fluff 1.xlsm
ABCDEFGHIJKLM
1BoreholeWeek1Week2Week3Week4OutputValuesw 18/10w 25/10w 01/11w 08/11
2ML11006/10/2021W 01/11ML110
3ML111W 18/10ML111
4ML114W 25/10ML114
5ML11710/10/202111/11/2021W 06/12 
6ML119W 08/11ML119
7ML12025/10/2021W 01/11ML120
8ML12919/09/202122/10/202105/11/2021W 06/12 
9
Main
Cell Formulas
RangeFormula
G2:G8G2=IF(SUM(COUNTIFS(B2:E2,$J$1:$M$1)),A2,"")
 
Upvote 0

Forum statistics

Threads
1,223,886
Messages
6,175,190
Members
452,616
Latest member
intern444

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