I've 2 set of ranges contains numbers A1:A5 , B1:B5
I want to get count for number of A cells greater than B cells
meanining
count(if A1 > B1 and A2>B2 and ....)
thanks
I've 2 set of ranges contains numbers A1:A5 , B1:B5
I want to get count for number of A cells greater than B cells
meanining
count(if A1 > B1 and A2>B2 and ....)
thanks
Try this
=SUMPRODUCT(--(B1:B5>A1:A5))
Does that help?
Try this:
Please Login or Register to view this content.
Docendo discimus.
this gives me True or False
I need count for nuber of A cells that are greater than B cells
what is -- mean?
Thanks alot
The "--" is called a double unary. It changes the TRUE/FALSE to 1/0. If you remove it, you will get TRUE/FALSE.
Hi besbesmany and welcome to the forum,
Find the attached for an answer. I think Ron is backwards and the smiling cat got the > sign correct. The double dash of -- is called a unary and makes sure the stuff that comes back is a number. It is like doing a negative of a negative.
One test is worth a thousand opinions.
Click the * Add Reputation below to say thanks.
i get True and when i remove -- i get false
there is no 1/0 at all
anyway how to get count number for larger cells
Ron isn't "backwards"! Only the > in his formula is.
Are you sure? He has B>A and could have done a communtative and made it A>B or flipped the sign and made it B<A or done both and got it wrong twice with A<B. All said and done - Ron may be backwards!?
Let's see if he defends himself. Better yet he could edit his post so it shows the correct answer.
I wonder if the OP will respond now?
Thanks alot , the attachement file is working as i want
Love this forum really
@besbesmany - Happy to help.
@MarvinP - Point conceded; I am not "sure". Apparently he gets dizzy and falls down alot.
I have a Windows Phone and when I shake it my Avitar falls down.
See the demo at http://cnettv.cnet.com/windows-phone...-50091820.html
I don't think my Avatar knows the GT from LT or < from > after he gets up.
Besbesmany,
It looks like your problem has been solved. This time, i will mark it [SOLVED] for you. Next time please ensure you do it for your threads.
Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.
If I have helped, Don't forget to add to my reputation (click on the star below the post)
Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
Use code tags when posting your VBA code: [code] Your code here [/code]
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks