Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
anandmr65
 
Posts: n/a
Default Count Occurences problem


Hi,

I have the column A with values from 1 to 5 and columns B also haveing
one to five. Now the issue is to count the number of rows where the
value in column B is greater than column A. I tried to use the count if
but could not. Could somebody suggest an easy way out.

Thanks & REgards
Anand

Example
A B
---------
1 2
2 2
1 3
4 5
5 5
3 2
The formula should return 4 in above example


--
anandmr65
------------------------------------------------------------------------
anandmr65's Profile: http://www.excelforum.com/member.php...o&userid=30728
View this thread: http://www.excelforum.com/showthread...hreadid=534008

  #2   Report Post  
Posted to microsoft.public.excel.misc
Peo Sjoblom
 
Posts: n/a
Default Count Occurences problem

I get 3

row 1 =1 B is greater
row2 = 0 equal
row3 = 1 B is greater
row4 = 1 B is greater
row5 = 0 equal
row6 = 0 A is greater


=SUMPRODUCT(--(B1:B6A1:A6))



--

Regards,

Peo Sjoblom

Excel 95 - Excel 2007
Northwest Excel Solutions
www.nwexcelsolutions.com
"It is a good thing to follow the first law of holes;
if you are in one stop digging." Lord Healey


"anandmr65" wrote
in message ...

Hi,

I have the column A with values from 1 to 5 and columns B also haveing
one to five. Now the issue is to count the number of rows where the
value in column B is greater than column A. I tried to use the count if
but could not. Could somebody suggest an easy way out.

Thanks & REgards
Anand

Example
A B
---------
1 2
2 2
1 3
4 5
5 5
3 2
The formula should return 4 in above example


--
anandmr65
------------------------------------------------------------------------
anandmr65's Profile:
http://www.excelforum.com/member.php...o&userid=30728
View this thread: http://www.excelforum.com/showthread...hreadid=534008



  #3   Report Post  
Posted to microsoft.public.excel.misc
John James
 
Posts: n/a
Default Count Occurences problem


The total in your example should be 3, not 4.

This array gives that result, - (P.S. Hold the Ctrl+Shift Keys whilst
pressing enter to have the formula work as an array):

=SUM(--(A1:A6<B1:B6))


--
John James
------------------------------------------------------------------------
John James's Profile: http://www.excelforum.com/member.php...o&userid=32690
View this thread: http://www.excelforum.com/showthread...hreadid=534008

  #4   Report Post  
Posted to microsoft.public.excel.misc
Biff
 
Posts: n/a
Default Count Occurences problem

Hi!

The formula should return 4 in above example


Are you sure about that?

=SUMPRODUCT(--(B1:B6A1:A6))

Returns 3

Biff

"anandmr65" wrote
in message ...

Hi,

I have the column A with values from 1 to 5 and columns B also haveing
one to five. Now the issue is to count the number of rows where the
value in column B is greater than column A. I tried to use the count if
but could not. Could somebody suggest an easy way out.

Thanks & REgards
Anand

Example
A B
---------
1 2
2 2
1 3
4 5
5 5
3 2
The formula should return 4 in above example


--
anandmr65
------------------------------------------------------------------------
anandmr65's Profile:
http://www.excelforum.com/member.php...o&userid=30728
View this thread: http://www.excelforum.com/showthread...hreadid=534008



  #5   Report Post  
Posted to microsoft.public.excel.misc
anandmr65
 
Posts: n/a
Default Count Occurences problem


Hi All,
Thanks a lot all of you for the solution. You are correct with the
answer "3". I was wrong. Your solution works. Sorry for misleading
you.

Thanks again

Regards
Anand


--
anandmr65
------------------------------------------------------------------------
anandmr65's Profile: http://www.excelforum.com/member.php...o&userid=30728
View this thread: http://www.excelforum.com/showthread...hreadid=534008

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
Datedif incorrect month count - February problem?? JMKCT Excel Worksheet Functions 4 December 14th 05 03:36 PM
Count With Date Problem rbdude Excel Worksheet Functions 2 June 8th 05 02:47 AM
Count occurences between dates DJ Dusty Excel Worksheet Functions 0 November 11th 04 09:02 PM
Count occurences between dates DJ Dusty Excel Worksheet Functions 3 November 11th 04 12:25 AM
Count data entries and date problem Gef Excel Worksheet Functions 5 November 4th 04 02:30 PM


All times are GMT +1. The time now is 08:09 AM.

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

About Us

"It's about Microsoft Excel"