Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
countif criteria sg
i have a column (column B) of cells with numbers in the cells. i want to
count for. example, how many cells have a number between 12 and 29. i used =countif(B:B,"=12 and <=29") but it did not work. =countif(B:B,"=12,<=29") also did not work. what is the correct syntax for the criteria in the formula? thanks for your help fred |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
countif criteria sg
=COUNTIF(B:B,"<30")-COUNTIF(B:B,"<12")
-- Gary''s Student - gsnu200802 |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
countif criteria sg
try
=sumproduct((b2:b22=12)*(b2:b22<=29)) -- Don Guillett Microsoft MVP Excel SalesAid Software "Fred Loh" wrote in message ... i have a column (column B) of cells with numbers in the cells. i want to count for. example, how many cells have a number between 12 and 29. i used =countif(B:B,"=12 and <=29") but it did not work. =countif(B:B,"=12,<=29") also did not work. what is the correct syntax for the criteria in the formula? thanks for your help fred |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
countif criteria sg
=SUM(COUNTIF(B:B,{"=12","29"})*{1,-1})
"Fred Loh" wrote: i have a column (column B) of cells with numbers in the cells. i want to count for. example, how many cells have a number between 12 and 29. i used =countif(B:B,"=12 and <=29") but it did not work. =countif(B:B,"=12,<=29") also did not work. what is the correct syntax for the criteria in the formula? thanks for your help fred |
#5
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
countif criteria sg
thanks guys!
Gary's Student's solution works and the logic makes sense. Teethless mama's solution also works but I don't understand why the need to multiply {1,-1} i can't get Don's solution to work. i have a "#NUM!" error. |
#6
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
countif criteria sg
Sumproduct does not take full columns. Must use a range as I did a2:a???
-- Don Guillett Microsoft MVP Excel SalesAid Software "Fred Loh" wrote in message ... thanks guys! Gary's Student's solution works and the logic makes sense. Teethless mama's solution also works but I don't understand why the need to multiply {1,-1} i can't get Don's solution to work. i have a "#NUM!" error. |
#7
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
countif criteria sg
It works! Thanks Don.
"Don Guillett" wrote: Sumproduct does not take full columns. Must use a range as I did a2:a??? -- Don Guillett Microsoft MVP Excel SalesAid Software "Fred Loh" wrote in message ... thanks guys! Gary's Student's solution works and the logic makes sense. Teethless mama's solution also works but I don't understand why the need to multiply {1,-1} i can't get Don's solution to work. i have a "#NUM!" error. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Two criteria for CountIf? | Excel Worksheet Functions | |||
COUNTIF with two criteria | Excel Worksheet Functions | |||
Countif using format criteria not number criteria? | Excel Worksheet Functions | |||
Countif using format criteria....not number criteria? | Excel Worksheet Functions | |||
countif criteria | Excel Worksheet Functions |