subtotals using COUNT

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
 
I

Ionut Filip

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
 
J

Jamie Collins

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.

--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top