Reputation: 85
I have got a table with 2 columns: AGE between 10 and 90 lets say :] and Time (spent on mobiles) What I need to do is- count how long people spent time on mobiles between 16 and 40. First part may be seemingly simple because we can count by countif how may people is using mobiles between 16 and 40 but how evaluate spend time on mobiles by the particular age groups. I will appreciate aaany help regards
Upvotes: 1
Views: 124
Reputation: 1
You can for example add additional column, with formula like:
=IF ( AND(A1>16, A1<40), B1, 0 )
where A is column with AGE, and B is column with Time, and then simply sum it!
Upvotes: -1
Reputation: 149335
I like the idea given by Boud of using Pivots but if you specifically want a formula then you can use SumProduct()
=SUMPRODUCT((A2:A13>16)*(A2:A13<40)*(B2:B13))
Do remember to format the cell as [h]:mm:ss
since you are adding up times.
SNAPSHOT
Upvotes: 2
Reputation: 32125
If you need to analyze your data more than creating a static function to count, you may consider using Pivot tables.
Build a simple pivot table with age in rows and time in values. Once this simple pivot table built, you can filter on the rows values, group them together among specific grouping criteria, select specific values by hand, etc.
Upvotes: 4