Search code examples
google-sheetsfiltermatch

Google sheets formula based upon a unique identifier and a date match (in between two dates)


I have two spreadsheets:

Spreadsheet 1: An ID #, A date

Spreadsheet 2 range rows: ID#, Start date, End Date, Pay

I need to match an ID #, match that the date is between two dates (start and end date) and have the result be the pay listed on spreadsheet 2 when K is listing pay.

This is causing an error:

=filter('Spreadsheet 2'!K:K,'Spreadsheet 2'!A:A=D3,'Spreadsheet 2'!E:E=<F3,'Spreadsheet 2'!F:F=>F3)

Solution

  • Use >= and <= instead of => and =<

    =FILTER('Spreadsheet 2'!K:K,'Spreadsheet 2'!A:A=D3,'Spreadsheet 2'!E:E<=F3,'Spreadsheet 2'!F:F>=F3)