GalacticPonderer
GalacticPonderer

Reputation: 547

Limiting row returns in table column search

I am trying to look up some data from a table in Excel, using the following formula

=IF(Table_People[Polity]=lookup_PolityRuler, Table_People[Name],"")

This does return only the rows that I want as a dynamic range. However, it also returns blank rows where the other data was (see below):

Blank Rows in Lookup

How can I (/ is it possible to) get just the rows from the data using a formula such as this?

Upvotes: 0

Views: 35

Answers (1)

JB-007
JB-007

Reputation: 2525

Assuming you have Excel as part of the Office 365 product, you can simply 'wrap' a filter around the desired formulation you have specified in this Q, viz (screenshot/here refer):

=LET(form,IF(Table6[Polity]=$B$4,Table6[Name],""),FILTER(form,form<>""))

Screenshot

(of course, applying the filter directly with the criteria Table6[Polity]=$B$4 would be a simpler / quicker soln..) i.e.

=FILTER(Table6[Name],Table6[Polity]=$B$4)

enter image description here

Upvotes: 1

Related Questions