I'm trying to count how many visits has occurred in the past 365 days in Google Sheets. Each account is in rows and the dates of transactions are dated in the columns. I will be listing individual visits by date.

I'm not sure if it would be a =countuniqueifs or how to really do this. Any help would be greatly appreciated as I'm stumped.

  • Consider sharing a publicly editable sample spreadsheet with realistic-looking data, and showing your hand-entered expected results there. Commented May 8, 2021 at 16:46

1 Answer 1


Assuming that account names are in sheet Visits column A2:A, and dates are in B2:K, try Insert > New sheet and this formula in cell A1 of the new sheet:

        Visits!B2:K >= today() - 365, 
    "select Col1, count(Col1) 
     where Col1 is not null 
     group by Col1 
     label Col1 'date' ", 

Format column A as Format > Number > Date.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.