Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 9
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,420
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 9
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,420
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
copy of excel file not showing formulal/function in the function b oaallam Excel Discussion (Misc queries) 4 September 6th 07 01:20 PM
LINKEDRANGE function - a complement to the PULL function (for getting values from a closed workbook) [email protected] Excel Worksheet Functions 0 September 5th 06 03:44 PM
Offset function with nested match function not finding host ss. MKunert Excel Worksheet Functions 1 March 21st 06 10:46 PM
Emulate Index/Match combo function w/ VBA custom function Spencer Hutton Excel Worksheet Functions 2 May 2nd 05 05:26 PM
Nested IF Function, Date Comparing, and NetworkDays Function carl Excel Worksheet Functions 2 December 29th 04 09:57 PM


All times are GMT +1. The time now is 11:45 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"