return multiple cells meeting a condition

Q

QC-Dude

How do I construct a formula to return multiple entries meeting a criteria?
I want the formula to return a vertical list of names where grade=2 or higher.

Example:
NAME GRADE
Mike 3
Scott 2
Mary 1
Larry 2
 
T

T. Valko

Try this array formula** :

Name = named range for the name column
Grade = named range for the grade column

Assume you want the list to start in cell D1.

Enter this array formula** in D1:

=IF(ROWS(D$1:D1)<=COUNTIF(Grade,">=2"),INDEX(Name,SMALL(IF(Grade>=2,ROW(Name)-MIN(ROW(Name))+1),ROWS(D$1:D1))),"")

Copy down until you get blanks

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top