Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 26
Default Count number of occurrences

What I am trying to do is count the number of appointments a customer had
before the sale. A sample of my data is below.

Customer Contact date Campaign Code Appointment Result Code
27200841 20060207 PR0002 RR
27200841 20060418 DM2625 SA
27200841 20060418 DM2625 SA
27200841 20060418 DM2625 SA
27200841 20060418 DM2625 SA
27200841 20060420 HK0001 TS
27200841 20060629 AA0001 RT
A0500751 20060330 MC0001 PR
A0500751 20060410 AA0001 TS
A0500751 20060412 DM2625 SA
A0500751 20060412 DM2625 SA
A0500751 20060417 HK0002 FT
A0500751 20060421 HK0002 FT

What I need to get is the number of times the customer came in before the
sale. A sale is coded as SA in the Appointment Result Code column. So for
customer 27200841 I want 1 and customer A0500751 I want 2.

I am struggling with what would be the best way to do this. Is there a
function that would work? Would it be better to put the data in a pivot
table and then use a function to get the results? Or would it be easier to
do something in Access, which is where the data will be pulled from, before I
export this to Excel?

Any help is greatly appreciated.

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default Count number of occurrences

=SUMPRODUCT(--(A2:A100="27200841"),--(D2:D100-"SA"))

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"MarkM" <mark_mattson(at)yahoo.com wrote in message
...
What I am trying to do is count the number of appointments a customer had
before the sale. A sample of my data is below.

Customer Contact date Campaign Code Appointment Result Code
27200841 20060207 PR0002 RR
27200841 20060418 DM2625 SA
27200841 20060418 DM2625 SA
27200841 20060418 DM2625 SA
27200841 20060418 DM2625 SA
27200841 20060420 HK0001 TS
27200841 20060629 AA0001 RT
A0500751 20060330 MC0001 PR
A0500751 20060410 AA0001 TS
A0500751 20060412 DM2625 SA
A0500751 20060412 DM2625 SA
A0500751 20060417 HK0002 FT
A0500751 20060421 HK0002 FT

What I need to get is the number of times the customer came in before the
sale. A sale is coded as SA in the Appointment Result Code column. So

for
customer 27200841 I want 1 and customer A0500751 I want 2.

I am struggling with what would be the best way to do this. Is there a
function that would work? Would it be better to put the data in a pivot
table and then use a function to get the results? Or would it be easier

to
do something in Access, which is where the data will be pulled from,

before I
export this to Excel?

Any help is greatly appreciated.



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
Countif for the number of a specific count? [email protected] Excel Worksheet Functions 2 June 27th 06 06:51 PM
how do I count the number of times text in column A matches text i Sheila Excel Worksheet Functions 2 November 16th 05 10:20 PM
Number count - postcodes and need to count the numbers of tim... Mark - Aust Excel Discussion (Misc queries) 1 October 24th 05 10:00 AM
How to count the number of times something occurs within a certain month Joyce Excel Worksheet Functions 2 October 18th 05 08:38 PM
Count Number of Characters in a cell? AHJuncti Excel Discussion (Misc queries) 2 June 16th 05 07:39 PM


All times are GMT +1. The time now is 07:11 AM.

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"