| |
You are here: Experts > Computing/Technology > Microsoft Software > Excel > count if
Excel - count if
Expert: Richard Roberts - 11/8/2009
Question I have two criteria in column C "individual,"organization" I need to switch between the two , using a drop down and display different results countif C3:C:30, "individual" "organization" I can make it happen using only one criteria but not both. Could you point me in the right direction.
Thanks
Answer Bill
I am not sure that I am reading the question correctly but--
You can use data validation to create your list of criteria that go in a cell that is referenced in your count formula. Then when you select either individual or organization from the list your formula will calculate based on which selection you make.
for example
Assume your countif formula says
=COUNTIF(C1:C30,A10)
In cell A10 you use data validation to create your drop down list
To do that make A10 the active cell and go to toolbar/data/validation
Under settings/validation criteria/ select list
You will then need to tell excel where your list is so in the source box put in the cells that will comprise your list in your case lets use H17 and H18--while the source box is active, paint those two cells in the worksheet, excel will put $H17:$H18 in the source box then click ok.
Now go to cells H17 and type in individual and in H18 type in organization.
Now when you click on the cell A10 you will be offered a drop down box that will say individual and organization select the one that you want hit enter and the countif formula will count based on your A10 selection.
Hope this helps
If I have read the question wrong let me know.
Richard
Florida
USA
Ask a Question
|
|