Google Spreadsheet 'Countunique' Returns 1 or 0

I have date data in rows in Sheet 1. Then, I want to count days with a range in another sheet (Sheet 2), with the countunique formula.

Sheet 2

tombol tanggal

Sheet 1

I use the following formula in cell B3: =countunique(filter('Sheet 1'!A2:A9, 'Sheet 1'!A2:A9>=B1, 'Sheet 1'!A2:A9<=B2))

But the result is 1, whereas the result should be 4, not 1.

However, if I input the value manually in Sheet 2 B1:B2 (not the value from Sheet 1), the results is correct: 4.

Sheet 2 with manual input

Please, help me solve this. Thank you.

1 answer

  • answered 2018-11-08 07:50 pnuts

    You may be trying to set the criteria for a date range (Numeric) with values that are Text. If so, try wrapping B1 and B2 in your UNIQUE formula with VALUE( ),