Thread: [Solved] Need help with a formula
View Single Post
 
Old 04-12-2009, 11:18 AM
Bird_FAT's Avatar
Bird_FAT Bird_FAT is offline Office 2007
Expert
 
Join Date: Apr 2009
Location: South East
Posts: 271
Bird_FAT is on a distinguished road
Default

Quote:
Originally Posted by tinkertron View Post
it's to only add up how many rows that column has something in it. so if there are 50 rows, and only say 20 has something in that column then the total would be 20.

So you are only looking to count if there is ANYTHING in the row - OK

Code:
=COUNTA(*RANGE*)
Type [=COUNTA(] (without [] brackets) and then go to the worksheet you want and select the range then type[)] and enter

COUNTA function will count all the cells and return the number that contain data

Using the example sheet that you uploaded the PRW Only total box would contain the following formula if it were counting all the Sales Person column in the TECH ONLY worksheet:

Code:
=COUNTA('TECH ONLY'!E5:E46)
If you are looking to count a particular word, not ANY data, this will need to be COUNTIF instead and would look like this:

If you were looking for how many times the name Phil were to appear in the First Name column on the TECH ONLY worksheet...

Code:
=COUNTIF('TECH ONLY'!C5:C46,"Phil")
Is that any help?



BTW - in PRW ONLY STATS cell F8 you should use a range operator, rather than individual cells when using =SUM - only when the cells are not next to each other do you need to revert to x+x+x+x

ie. =SUM(B8:E8) is the same as =(B8+C8+D8+E8)

in the second example you don't need SUM because you are using the + symbol which is what =SUM means!

Welcome to the fun world of Excel formulas - just wait till BODMAS comes along to bite you - LOL!
Reply With Quote