subtotals using COUNT

  • Thread starter Thread starter Ionut Filip
  • Start date Start date
I

Ionut Filip

Hi all,
Newbie here
I want to add subtotals to my spreadsheet. For example, I have a companyID,
Employee ID, VacationDaysLeft, VacationDaysUsed.
I'm trying to insert subtotals (grouping by company ID). I want to know how
many employees used more than 10 days of vacation, and how many emplyees
have more that 12 days of vacation left (this is an example only)
If I try to use the subtotals feature in excel, it will break it down by
companies, and it will generate subtotals for each company using
SUBTOTAL(3,..) - where 3 is the id for COUNTA.
CountA is not good enough. What I would need that thing to generate for me
would be a CountIF for example - to only count those where >10 , but it is
not available. Even (with some additional calculated columns ) a SUBTOTAL
using function ID =3 (count) would be good enough, but the damn feature will
only generate subtotals using function 4 for me.
Of course, I could manually chage the function - but if you have hundreds of
subtotals, that would be a pain. The easy way would be to import all in sql
server and write a query for that - but this is not an option.
Is there any way to customize how those subtotals are generated?
thanks
 
Oopsie, this is easy, I figured it out, just like in SQL
Add a calculated column, and popultate it with 0 or 1, depending if the
condition is met, and sub the 0 and 1
 
Ionut said:
Oopsie, this is easy, I figured it out, just like in SQL
Add a calculated column, and popultate it with 0 or 1, depending if the
condition is met, and sub the 0 and 1

Eeek! This is not how it is done is SQL. Surely you'd use a GROUP BY
clause?

Jamie.

--
 
Back
Top