Retrieving lines from a dataset that match more than one criteria using array formula

Sztofts

New Member
Joined
Mar 9, 2019
Messages
2
Hi

I am having trouble getting this simple task completed. I want to retrieve the lines from the dataset which match the criteria in the criteria range as there's more than one criteria, the lines retrieved must match just one of the criteria to appear in the result.

The formula I am having trouble with is:

'=SMALL(IF($C$3:$C$8=$H$11,ROW($B$3:$B$8)-2,IF($C$3:$C$8=$H$12,ROW($B$3:$B$8)-2,IF($C$3:$C$8,$H$13,ROW($B$3:$B$8)-2))),ROW(1:1))

where
C3:C8 is the data set
H11:H13 is the criteria (three cells)

There are curly brackets around my working formula which do not appear in the formula above.

Any help greatly appreciated.
 

Some videos you may like

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result

AhoyNC

Well-known Member
Joined
Oct 10, 2011
Messages
4,619
Office Version
  1. 365
Platform
  1. Windows
Try one of these formulas. Formula in D1 if you have Excel 2010 or later or formula in F1 which must be enter with CTRL-SHIFT-ENTER. Drag formulas down as needed.
Excel Workbook
CDEFG
2Data
3test111
4test244
5test377
6test488
7test5
8test6
9test4
10test8
11test9test1
12test4
13test8
Sheet
 

Watch MrExcel Video

Forum statistics

Threads
1,109,032
Messages
5,526,358
Members
409,697
Latest member
christopherlewis1620

This Week's Hot Topics

Top