Home > Software engineering >  Using Filters to match and preventing incorrect data due to blank cells
Using Filters to match and preventing incorrect data due to blank cells

Time:11-26

I'm attempting to match data from two different sheets and bring in a list of company names from that matching row

A1:A1000 = List of Companies
E1:E5000 = List of Matchable IDs
C1 = Manually Input ID

The following macro works:

=IFERROR(FILTER('List Companies'!A1:A1000,'List Companies'!E1:E1000='ID Sheet'!C1),"")

However if C9 is blank it returns an incorrect list.

If I try and use the following:

=IF(ISBLANK('ID Sheet'!C1), "", IFERROR(FILTER('List Companies'!A1:A1000,'List Companies'!E1:E1000='ID Sheet'!C1),""))

It returns:

"~ERROR"

I'm sure I must be doing something wrong but I don't know what I am doing wrong... if anyone could point out my mistake I would greatly appreciate some help.

CodePudding user response:

VLOOKUP it.

if C1 is manual input of ID then:

=IFNA(VLOOKUP('ID Sheet'!C1, {'List Companies'!E:E, 'List Companies'!A:A}, 2, 0))
  • Related