0

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.

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

1 Answer 1

0

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:

=arrayformula( 
  query( 
    flatten( 
      if( 
        Visits!B2:K >= today() - 365, 
        Visits!B2:K, 
        iferror(1/0) 
      ) 
    ), 
    "select Col1, count(Col1) 
     where Col1 is not null 
     group by Col1 
     label Col1 'date' ", 
    0 
  ) 
)

Format column A as Format > Number > Date.

Your Answer

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

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