Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Right function to use
State Ins
1 ny prc 2 ny crc 3 ny crc 4 ct prc 5 ct prc 6 ct crc 7 oh prc 8 oh prc STATE PRC CRC NY XXXX XXXX CT OH I want to put a function where the XXX's are that will count the number of occurances of PRC or CRC based on a particular state code, using the rows above. I have tried COUNTIF but I can not get the arguments correct?? |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Right function to use
=SUMPRODUCT(--($A$2:$A$6=$A11),--($B$2:$B$8=B$10))
adjust the ranges to suit -- __________________________________ HTH Bob "SHelley" wrote in message ... State Ins 1 ny prc 2 ny crc 3 ny crc 4 ct prc 5 ct prc 6 ct crc 7 oh prc 8 oh prc STATE PRC CRC NY XXXX XXXX CT OH I want to put a function where the XXX's are that will count the number of occurances of PRC or CRC based on a particular state code, using the rows above. I have tried COUNTIF but I can not get the arguments correct?? |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Right function to use
Bob, Thanks, this worked great. One more, what if I needed to have another
argument for the same array: like if the first range is NY or OH, and the second range is prc? "Bob Phillips" wrote: =SUMPRODUCT(--($A$2:$A$6=$A11),--($B$2:$B$8=B$10)) adjust the ranges to suit -- __________________________________ HTH Bob "SHelley" wrote in message ... State Ins 1 ny prc 2 ny crc 3 ny crc 4 ct prc 5 ct prc 6 ct crc 7 oh prc 8 oh prc STATE PRC CRC NY XXXX XXXX CT OH I want to put a function where the XXX's are that will count the number of occurances of PRC or CRC based on a particular state code, using the rows above. I have tried COUNTIF but I can not get the arguments correct?? |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Right function to use
=SUMPRODUCT(($A$2:$A$8={"NY","OH"})*($B$2:$B$8="pr c"))
-- __________________________________ HTH Bob "SHelley" wrote in message ... Bob, Thanks, this worked great. One more, what if I needed to have another argument for the same array: like if the first range is NY or OH, and the second range is prc? "Bob Phillips" wrote: =SUMPRODUCT(--($A$2:$A$6=$A11),--($B$2:$B$8=B$10)) adjust the ranges to suit -- __________________________________ HTH Bob "SHelley" wrote in message ... State Ins 1 ny prc 2 ny crc 3 ny crc 4 ct prc 5 ct prc 6 ct crc 7 oh prc 8 oh prc STATE PRC CRC NY XXXX XXXX CT OH I want to put a function where the XXX's are that will count the number of occurances of PRC or CRC based on a particular state code, using the rows above. I have tried COUNTIF but I can not get the arguments correct?? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
copy of excel file not showing formulal/function in the function b | Excel Discussion (Misc queries) | |||
LINKEDRANGE function - a complement to the PULL function (for getting values from a closed workbook) | Excel Worksheet Functions | |||
Offset function with nested match function not finding host ss. | Excel Worksheet Functions | |||
Emulate Index/Match combo function w/ VBA custom function | Excel Worksheet Functions | |||
Nested IF Function, Date Comparing, and NetworkDays Function | Excel Worksheet Functions |