+ Reply to Thread
Results 1 to 10 of 10

Count changes from A to B in a dataset

  1. #1
    Registered User
    Join Date
    07-07-2019
    Location
    Taipei, Taiwan
    MS-Off Ver
    16.26, for Mac
    Posts
    5

    Red face Count changes from A to B in a dataset

    Hello guys.
    I need your help with choosing the appropriate Excel formula (common problem for people in this forum...)
    Let's say I have the following premises. Ten people often go to a certain restaurant. The date and dish that they had at that restaurant have been registered for the past 3 months. In the beginning there was only one dish in the menu, let's say rice. At some point the restaurant introduced pasta in the menu. Some people stuck with rice while others started eating pasta (these guys did not ever switch back to rice). These people don't go together to the restaurant, therefore there might more entries in the table for some of them than the others. I want to respond to the following question: how many people have switched from rice to pasta, per month and across the entire study? The real dataset I need to analyze to is more complicated than this one, so manual analysis would be too time-consuming. Formulas are required. Can you guys help me out?
    Thanks in advance.

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,055

    Re: Count changes from A to B in a dataset

    This is wayyy too vague.

    Will you please attach a SMALL sample Excel workbook (10-20 rows of data is usually enough)? However, please give us an indication of the approximate number of rows of data you want the solution to work with (100, 1000, 100,000 or whatever). Please don't attach a picture of an Excel sheet (no-one will want to re-type all your stuff before starting).

    1. It does NOT have to be your real sheet - mock up a SAMPLE if you need to. But not 1000's of rows!!! It makes manual checking so tedious. Whatever you do... make sure that all confidential information is removed first!!

    2. Make sure that your sample data are truly REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    3. Make sure that your desired solution is also shown (mock up the results manually).

    4. Try to avoid using merged cells. They cause lots of problems!

    Unfortunately the attachment icon doesn't work at the moment. So, to attach an Excel file you have to do the following: Just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Registered User
    Join Date
    07-07-2019
    Location
    Taipei, Taiwan
    MS-Off Ver
    16.26, for Mac
    Posts
    5

    Re: Count changes from A to B in a dataset

    Here it is.
    Thanks.
    Attached Files Attached Files

  4. #4
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,448

    Re: Count changes from A to B in a dataset

    Please update your profile as necessary to reflect your location ( country is OK, no need to be more precise). Regional settings can be important to give a correct answer in some cases.
    Thank you

  5. #5
    Registered User
    Join Date
    07-07-2019
    Location
    Taipei, Taiwan
    MS-Off Ver
    16.26, for Mac
    Posts
    5

    Re: Count changes from A to B in a dataset

    Sorry about that. I've updated it.

  6. #6
    Forum Expert avk's Avatar
    Join Date
    07-12-2007
    Location
    India
    MS-Off Ver
    Microsoft Office 2013
    Posts
    3,223

    Re: Count changes from A to B in a dataset

    Firstly change your date column format as English (United States)
    With simple countifs function with criteria id, dish, month you can count how many people choose dish.
    Attached Files Attached Files


    atul


    If my answer (or that of other members) has helped you, please say "Thanks" by clicking the Add Reputation button at the foot of one of their posts.

    Also: if your problem is solved, please take the time to mark your thread as SOLVED by going to the top of your first post, selecting "Thread Tools" and then "Mark thread as solved".

  7. #7
    Registered User
    Join Date
    07-07-2019
    Location
    Taipei, Taiwan
    MS-Off Ver
    16.26, for Mac
    Posts
    5

    Re: Count changes from A to B in a dataset

    Hey avk. Thanks for your time.
    I understand how you counted using COUNTIF. However, what I need is to find out how many IDs have switched from Rice to Pasta. For example, from your table one can visually see that for July the answer is 0. But I would need to find that answer automatically and then apply it to a large dataset. Thank you.

  8. #8
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,055

    Re: Count changes from A to B in a dataset

    This is a partial answer (for the whole period). I'll explain as required, but take a look. Is this what you had in mind? I was still a bit in the dark...
    Attached Files Attached Files

  9. #9
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,448

    Re: Count changes from A to B in a dataset

    Quote Originally Posted by apedrog View Post
    Sorry about that. I've updated it.
    Thanks for the update

  10. #10
    Registered User
    Join Date
    07-07-2019
    Location
    Taipei, Taiwan
    MS-Off Ver
    16.26, for Mac
    Posts
    5

    Re: Count changes from A to B in a dataset

    Thank you for your help. Let me have a look.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. COUNT occurances within a year across columns in a broad dataset
    By RoundaboutCJP in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 10-22-2018, 08:33 AM
  2. [SOLVED] How to use COUNTIF on a dataset and getting only count from 2 conditions
    By EXCELBENCH in forum Excel Formulas & Functions
    Replies: 19
    Last Post: 10-20-2018, 12:27 PM
  3. Replies: 3
    Last Post: 10-20-2017, 12:40 AM
  4. Replies: 3
    Last Post: 01-23-2014, 10:13 AM
  5. [SOLVED] Vertical chart dataset needs to be converted into pivotable dataset
    By aspak84 in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 09-17-2013, 06:06 PM
  6. Copying a dataset multiple times - and selecting titles for this dataset
    By alocke in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-07-2012, 10:15 PM
  7. Dataset: count and return if user has both R1 and R2
    By rchxenson in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-27-2009, 11:58 AM

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