+ Reply to Thread
Results 1 to 12 of 12

Count number of repeat stays

  1. #1
    Forum Contributor
    Join Date
    06-23-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    127

    Post Count number of repeat stays

    Good day.

    Can someone kindly assist to help create a function that will count the no. of repeat stay per year. Attached is the excel file with an explanation of the desired outcome.

    Many thanks in advance.
    Attached Files Attached Files

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: Count Function

    Maybe try

    =SUMPRODUCT(--($B$3:$B$13>0),--($C$3:$C$13>0)) >> 8

    =SUMPRODUCT(--($B$3:$B$13>0),--($C$3:$C$13>0),--($D$3:$D$13>0)) >> 4
    HTH
    Regards, Jeff

  3. #3
    Forum Contributor
    Join Date
    06-23-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    127

    Re: Count Function

    Thanks Jeff!

    Thats exactly what I needed. Appreciate the help!

    Cheers

  4. #4
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: Count number of repeat stays

    You are very welcome and thanks for the feedback

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

  5. #5
    Forum Contributor
    Join Date
    06-23-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    127

    Re: Count number of repeat stays

    Hi Jeff

    I will, but I have a follow up request, same file but should I open a new thread? Just fairly new to the forum, sorry

  6. #6
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: Count number of repeat stays

    Is it another count question? If not then a new thread would be good and no need to be sorry.

  7. #7
    Forum Contributor
    Join Date
    06-23-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    127

    Re: Count number of repeat stays

    Hi Jeff

    Yes, related to count. I have attached the spreasheet with the desired outcome, not sure if its possible

    Thanks again for the help and patience.
    Attached Files Attached Files

  8. #8
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: Count number of repeat stays

    Drawing a blank right now on the last part (by year and by resort with max stays), but don't fear, I will call on the formula guru's.

    Check out what I have done so far and see if this gets close to what you desire.
    Attached Files Attached Files

  9. #9
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: Count number of repeat stays

    If I read the last part right, resort with most no of repeat stay per year, the results should be,

    2010 >> MNL >> 6
    2011 >> MNL >> 12
    2012 >> a tie between BKK and MNL at 3 (What result do you want?)

    Also, you profile says 2003 and this is correct?

  10. #10
    Forum Contributor
    Join Date
    06-23-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    127

    Re: Count number of repeat stays

    Hi Jeff

    Thanks again, thats what I needed. However, I actually compiled that data manually. In the attached spreadsheet, I have the pivot table and the data source. Just wondering, how should I go about to count those info if the values/data are coming from the pivot table.

    Many thanks again for your assistance.
    Attached Files Attached Files

  11. #11
    Forum Contributor
    Join Date
    06-23-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    127

    Re: Count number of repeat stays

    Hi Jeff

    I hope I make sense with the request above Basically with the data I have, the result that I need is to count the number of repeat stay (members who stayed 1x or 2x or 3x ... in year 2010, 2011 and 2012). The file that I sent to you initially was tabulated manually.

    The last attachment is the raw data that I have. I put them in pivot table and hopefully be able to create a function that will count the ff:
    1. No. of repeat stays per year. (Which I managed to do, manually though)
    2. Count the No. of Members with Repeat Stay in year 2010 & 2011 & 2012 / Members with Repeat Stay in year 2010 & 2011 per Tier (which you helped me as per request earlier) but wish to generate count from the pivot table if possible (Attachment post no.10)


    Maybe the way I explain it is confusing but please let me know if u need any clarification.

  12. #12
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Count number of repeat stays

    Using your sample data from post #7, I have a different definition of a "repeat visitor". That would be someone who has a value > 1 in the column I added to the data. In your sample, only ONE patron has more than one stay in one year.
    Attached Files Attached Files
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

+ 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