Hi folks
Have attached a sample sheet for perusal.
Cheers
hammer
Hi folks
Have attached a sample sheet for perusal.
Cheers
hammer
In B2 and copy down
=COUNTIF($A$2:$A$7,A2)
However, if you want to count only unique numbers you can use formula below
=IF(COUNTIF($A$2:$A2,A2)=1,1,0)
Last edited by AlKey; 10-11-2014 at 11:52 PM.
If you like my answer please click on * Add Reputation
Don't forget to mark threads as "Solved" if your problem has been resolved
"Nothing is so firmly believed as what we least know."
--Michel de Montaigne
Hi AlKey
That formula does not work for me.
B8 should be returning "3" for me.
So the value 6 in A in sheet1 shows up 4 times but only 3 times with 1 adjacent in B.
Thanks
Your example does not have any values in column B. How do one supposed to know where are the ones should be?
Hi AlKey
Apologies if my sample is incorrect.
Sheet2 ColB is where I need to place the formula.
So sheet2 B8 should return 3 being the count of "6" from sheet1 Col A with adjacent "1" in Col B from sheet1
Hope this makes it clearer
Thanks
Oh, I didn't see sheet one. My bad.
=COUNT(IF(Sheet1!$B$2:$B$15=1,Sheet1!$A$2:$A$15))
...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.
Hi
That one is returning 3 in every cell in Col B
Hopefully to explain myself better sheet2 A2 has "0" in it.
I want to look up "0" in Col A Sheet1 to find the "0"s that have "1" in the adjacent cell Col B sheet1
and to return the count of same in B2 Sheet2 etc and to be able to pull it down.
Thanks
Sorry, I don't think I understand what you want. It happens to me once in while so maybe this is one of those nights.
I think I may have fluked it
=COUNTIFS(Sheet1!A:A,Sheet2!A2,Sheet1!B:B,1)
That works when dragged down as it changes Sheet2!A2 to Sheet2!A3 etc
Thanks for your time Al-appreciated
I know exactly what AlKey means about sometimes not understandingTry this...
=COUNTIFS(Sheet1!$A$2:$A$15,Sheet2!A2,Sheet1!$B$2:$B$15,1)
1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
2. If your question is resolved, mark it SOLVED using the thread tools
3. Click on the star if you think someone helped you
Regards
Ford
Snap! Thanks to you too Sir!
Glad it worked for you![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks