Basically, to replicate your Google Sheets formula in Excel, you’ll need a different approach since Excel doesn’t have a direct QUERY equivalent. One way is to use a helper column to count occurrences. If your data is in column A, you can use =COUNTIF(A:A, A2) in column B to get the counts.