+ Reply to Thread
Results 1 to 2 of 2

Formula help for identifying monthly product switches

  1. #1
    Registered User
    Join Date
    12-06-2013
    Location
    Philadelphia, PA
    MS-Off Ver
    Excel 2010
    Posts
    14

    Formula help for identifying monthly product switches

    My dataset is a table in excel. The first column identifies the patient with a unique patient ID # on each row. The remaining column headers are the dates. Each row contains what product the patient is on. On any given month a patient could remain on the product, not be on the product (blank cell) or switch to a new product. For example:

    Patient ID Jan 2016 Feb 2016 March 2016
    1 Product1 Product2
    2 Product2 Product2 Product2
    3 Product3 Product4 Product4

    In this example,

    Patient 1 switched from Product1 to Product2 despite a blank
    Patient 2 remained on the same Product2
    Patient 3 switched from Product3 to Product4

    What I am trying to accomplish in my analysis is how many patients switched, and to what product and from what product.


    Number of switches for Product1 Jan 2016 Feb 2016 March 2016
    Switch to Product2 0 0 1

    Number of switches for Product2 0 0 0

    Number of switches for Product3
    Switch to Product4 0 1 0

    My main challenge has been creating a formula that contains text as the values and not numbers.

    Attached is an example dataset. Any assistance would be appreciated! Thanks!
    Attached Files Attached Files

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,810

    Re: Formula help for identifying monthly product switches

    First of all, I would suggest that you change the dates in row 1. If you look at what is in cell C1, for example, in the formula bar you will see 15th Dec 2016 and in D1 it is 16th Jan 2016, but as they are formatted to show dd-mmm it looks as if you are moving from Dec 2015 to Jan 2016. Put your first date in B1 (e.g. 1st Nov 2015) then put this formula in C1:

    =DATE(YEAR(B1),MONTH(B1)+1,1)

    and apply a custom format to those cells of "mmm-yy", then copy the formula from C1 across the row to avoid any confusion.

    I'll take a look at the rest of it now.

    Hope this helps.

    Pete

+ 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. Identifying Different Values in Monthly Reports
    By nadrojylloh in forum Excel General
    Replies: 0
    Last Post: 07-31-2014, 01:47 PM
  2. Identifying Differences in Monthly Reports
    By nadrojylloh in forum Excel General
    Replies: 8
    Last Post: 07-28-2014, 06:57 PM
  3. Identifying when value switches in rows
    By Knollie81 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-10-2013, 01:13 PM
  4. summarize monthly worksheets by product
    By PEC in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-22-2011, 02:12 PM
  5. Replies: 10
    Last Post: 01-14-2010, 05:45 PM
  6. formula switches to value ?!?
    By mark kubicki in forum Excel General
    Replies: 4
    Last Post: 05-11-2006, 03:15 PM
  7. Identifying Product Weights
    By Bambos in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-17-2005, 09:03 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