Hello Everyone,
First time, long time - I've found help here numerous times but this time I'm stumped. My heartfelt gratitude is extended prior to anyone answering with the hope you are able to help.
Here goes:
I have a spreadsheet with almost 103,000 rows and 28 columns of data from which I'm creating multiple pivot tables.
The rows in Column 'A' contain one of two values, either "Big" or "Sky". Column 'B' contains a Customer Number, a six-digit code. Column 'C' contains the formula =COUNTIF($B$2:$B$10300,$B2), giving me a count each Customer Number. This is great, I now know if that Customer Number is a one-time or repeat customer.
The problem is, I now need to know if that Customer Number is a repeat customer of both "Big" AND "Sky". Is there a formula that can return something simple as a "1" or "Yes" - anything that will allow me to pull/sort in a pivot table - for this criteria.
Make sense?
Any/all help is appreciated...
Last edited by Fister; 07-19-2011 at 12:20 PM.
have you looked at countifs?
"Unless otherwise stated all my comments are directed at OP"
Mojito connoisseur and a dabbler in Cisco
where does code go ?
look here
how to insert code
how to enter array formula
why use -- in sumproduct
recommended reading
wiki Mojito
how to say no convincingly
most important thing you need
Martin Wilson: SPV
and RSMBC
Hi,
How about:
Entered with Ctrl-Shift-Enter.{=AND(SUM(--($A$2:$A$10300&$B$2:$B$10300="Big"&B2)),SUM(--($A$2:$A$10300&$B$2:$B$10300="Sky"&B2)))}
This should give you a True/False result.
Cheers,
“To sin by silence when they should protest makes cowards of men.” ~ Abraham Lincoln
Going with Martin's COUNTIFS suggestion.......this formula will tell you whether a specific customer is both a Big and a Sky customer
=PRODUCT(COUNTIFS(A$2:A$10300,{"Big","Sky"},B$2:B$10300,B2))>0
If you want to know if a customer is a repeat customer for both, i.e. at least 2 transactions with both then change to
=SUMPRODUCT((COUNTIFS(A$2:A$10300,{"Big","Sky"},B$2:B$10300,B2)>1)+0)=2
Audere est facere
Thank you for your help, Conne and daddy!
![]()
My head hurts...
There are now two new additions to column A - "Big", "Sky", "Lake", "Lodge" - and I include "Lake" and "Lodge" into the formula, it no longer marks and cell as True.
What happened?
Which formula are you using?
Audere est facere
=PRODUCT(COUNTIFS(A$2:A$10300,{"Big","Sky","Lake","Lodge"},B$2:B$10300,B2))>0
=COUNTIFS($B$2:$B$10300,B2,$A$2:$A$10300,"<>"&A2)>0
seems to work.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks