Thread: [Solved] Need help with a formula
View Single Post
 
Old 04-16-2009, 10:07 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
Cool No Worries M8!

No worries!

Code:
=COUNTIFS(Sheet1!RANGE1,"NAME",Sheet1!RANGE,"CONDITION")
Explanation

COUNTIFS - multiple conditions version of COUNTIF
Sheet1! - this is the name of the sheet that the range is on - ALWAYS put the ! at the end!!
RANGE1 - the range (eg: A2:A123) that contains the Officers names
"NAME" - Officers name - replace the word NAME, but keep the ""
RANGE2 - the range (eg: B2:B123) that contains the words 'tech' or 'pend'
CONDITION - however you want to word, 'tech' or 'pend'

eg
Code:
=COUNTIFS(Sheet1!A2:A21,"Bill",Sheet1!B2:B21,"Tech")
This code, for example would look in Column A for the word 'Bill', then look in column B and check if the word 'Tech' is there - it will return a value only if both conditions are met. You would then have to have the following formula in another cell:
Code:
=COUNTIFS(Sheet1!A2:A21,"Bill",Sheet1!B2:B21,"Pend")
You will need to replicate the code twice for each Officer - one for tech, and one for pend, but the formula is there above, so all you have to do is alter it

Have fun!
Reply With Quote