+ Reply to Thread
Results 1 to 4 of 4

count / frequency of visits with conditions

  1. #1
    Registered User
    Join Date
    06-03-2011
    Location
    Florida, USA
    MS-Off Ver
    Excel 2013
    Posts
    46

    count / frequency of visits with conditions

    Hi,

    I have a list of customer numbers in column A. In column B I have a "Y" or a "N"

    A B

    12345 Y
    12345 Y
    12345 N
    12348 Y
    12348 Y
    12348 Y
    12349 N
    12349 N
    12350 Y

    1) Firstly I just want to count the number of times a customer visits shop 1x, 2x etc.

    Number of customers who visit X number of times: (from example above)
    1x 1 (this is based on 12350 visiting once)
    2x 1 (this is based on ID 12349 visiting twice)
    3x 2 (this is based on ID 12345 and 12348 visiting 3 times each)
    etc

    2) Then if possible, I would also like to count the number of customer visits but with taking into account "Y" indicator only. so only count number of visits per customers with "Y".

    Thanks.
    Last edited by maymano; 08-19-2011 at 03:32 AM.

  2. #2
    Valued Forum Contributor tlafferty's Avatar
    Join Date
    04-08-2011
    Location
    United States, Tacoma, WA
    MS-Off Ver
    Excel 2010, Excel 2013 Customer Preview
    Posts
    1,112

    Re: count / frequency of visits with conditions

    Use a pivot table. See attached.
    Attached Files Attached Files
    If your question has been satisfactorily addressed, please consider marking it solved. Click the Thread Tools dropdown and select Mark thread as solved.
    Also, you might want to add to the user's reputation by clicking the star icon in the lower left corner of the post with the answer- it's why we do what we do...

    Thomas Lafferty
    Analyst/Programmer

  3. #3
    Registered User
    Join Date
    08-16-2011
    Location
    Denver, Colorado
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: count / frequency of visits with conditions

    1.) Create a column with number of visits (say it's column C) Fill in for each customer and sum. If you want to see how many customers visit the shop once, twice, etc., use the following:

    =Countif(C1:C200,1) - Counts customers who visit once
    =Countif(C1:C200,2) - Counts customers who visit twice
    etc., etc.

    2). Countifs(C1:C200,1,B1:B200,"Y") - Counts customers who visit once and have a "Y".
    etc., etc.

  4. #4
    Registered User
    Join Date
    06-03-2011
    Location
    Florida, USA
    MS-Off Ver
    Excel 2013
    Posts
    46

    Re: count / frequency of visits with conditions

    Quote Originally Posted by tlafferty View Post
    Use a pivot table. See attached.
    Thanks - pivot table works well!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1