Excel/Excel 365 - =FILTER() function checking different workbooks

Excel/Excel 365 - =FILTER() function checking different workbooks

Currently I'm using a basic FILTER function on Excel365 to show me information from a different Workbook (WORKBOOK 2) based on the cell criteria set in Workbook 1. This works absolutely fine. So, I'm asking Excel to provide me information from FY64; A1 = 'FY64' this searches Column A in Workbook 2 and then outputs Column's D through to G in Workbook 1 with the information I need to view using the below;

=FILTER('[WORKBOOK2]Info'!$D:$G,'[WORKBOOK2]Info'!$A:$A='WORKBOOK1'$A$1)

However, I have another workbook (WORKBOOK 3) with same information from previous year (FY63). If A1 in WORKBOOK 1 = FY63 is it possible for the filter to check WORKBOOK 2, realise there is no information and then checks WORKBOOK 3 and outputs the information found in WORKBOOK 3?

Tried creating an IF function, unable to retrieve the information. Tried using FILTER(Formula)*FILTER(Formula) and received #CALC as there's a calculation error

Answer

This does not look like it is specific to having data in other workbooks.
The solution lies in one of the parameters for the Filter function, more preciselyif_empty.

With a LET to declare the search value once and use it twice, this would give you:

=LET(SearchValue, $A$1,
  FILTER('[WORKBOOK2]Info'!$D:$G,F1:F11=SearchValue,
    FILTER('[WORKBOOK3]Info'!$D:$G,I1:I11=SearchValue)
  )
)

Enjoyed this question?

Check out more content on our blog or follow us on social media.

Browse more questions