+ Reply to Thread
Results 1 to 12 of 12

Is this doable with excel? Categorizing by pattern?

  1. #1
    Registered User
    Join Date
    03-14-2019
    Location
    Korea
    MS-Off Ver
    MS Office 2013
    Posts
    7

    Is this doable with excel? Categorizing by pattern?

    Hi all!
    So many posts have greatly helped to filter out unnecessary data.

    However, I'm finding it hard to do the following with my data

    My final goal is to separate a patient list by 3 categories into different sheets:

    Category 1 DRUG GROUP (TA2,TA5,TE3,TR15,TR20) changed to DRUG GROUP (WR)
    Category 2 DRUG GROUP (WR) changed to DRUG GROUP (TA2,TA5,TE3,TR15,TR20)
    Category 3 DRUG GROUP (TA2,TA5,TE3,TR15,TR20) changed to another within the same DRUG GROUP (TA2,TA5,TE3,TR15,TR20)

    sample data file.png

    See my attached file.
    I am really not sure if it is doable with excel unless I do it manually.
    Is this doable at all?

    Any help is much appreciated.
    Attached Images Attached Images

  2. #2
    Registered User
    Join Date
    03-14-2019
    Location
    Korea
    MS-Off Ver
    MS Office 2013
    Posts
    7

    Re: Is this doable with excel? Categorizing by pattern?

    Attached the sample file
    Attached Files Attached Files
    Last edited by Claudia04; 03-14-2019 at 09:20 AM. Reason: Text showed wrong

  3. #3
    Valued Forum Contributor
    Join Date
    01-07-2013
    Location
    Michigan
    MS-Off Ver
    O365
    Posts
    601

    Re: Is this doable with excel? Categorizing by pattern?

    Nevermind, you figured out how to upload
    Last edited by Melvosh; 03-14-2019 at 09:22 AM. Reason: Instructions no longer needed

  4. #4
    Registered User
    Join Date
    03-14-2019
    Location
    Korea
    MS-Off Ver
    MS Office 2013
    Posts
    7

    Re: Is this doable with excel? Categorizing by pattern?

    Thank you Melvosh!
    Got lost in the middle but found my way

  5. #5
    Valued Forum Contributor
    Join Date
    01-07-2013
    Location
    Michigan
    MS-Off Ver
    O365
    Posts
    601

    Re: Is this doable with excel? Categorizing by pattern?

    Will patients always be grouped together as shown in your example? Will the dates always be in ascending order?

  6. #6
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Is this doable with excel? Categorizing by pattern?

    Also are we to understand that 'Sample'E14 is a typo? Is WF. Should it be WR?
    Dave

  7. #7
    Registered User
    Join Date
    03-14-2019
    Location
    Korea
    MS-Off Ver
    MS Office 2013
    Posts
    7

    Re: Is this doable with excel? Categorizing by pattern?

    Hi Melvosh!

    Yes they will, I'm trying to see how each patient changed his drug categories over time between 2016-2018.
    Got the list of prescriptions issued and they are always sorted out by 1. PT ID and 2. Date of prescription.





    Claudia

  8. #8
    Registered User
    Join Date
    03-14-2019
    Location
    Korea
    MS-Off Ver
    MS Office 2013
    Posts
    7

    Re: Is this doable with excel? Categorizing by pattern?

    To FlameRetired,

    My bad, that is a typo

    The correct one would be like the following

    sample data file_typo.png
    Attached Files Attached Files

  9. #9
    Valued Forum Contributor
    Join Date
    01-07-2013
    Location
    Michigan
    MS-Off Ver
    O365
    Posts
    601

    Re: Is this doable with excel? Categorizing by pattern?

    Two questions:
    What determines the initial category?
    Can a patient have more than one category, or is the category for a patient the same for all rows, based on just the latest change?

  10. #10
    Registered User
    Join Date
    03-14-2019
    Location
    Korea
    MS-Off Ver
    MS Office 2013
    Posts
    7

    Re: Is this doable with excel? Categorizing by pattern?

    Hi Melvosh!
    A patient can be in only one category.

    The category is based on which drug group the PT is prescribed first and the changes that follow over time.
    If a patient is prescribed WR first and later on TA5, the patient is in category 2.
    "Category 2 DRUG GROUP (WR) changed to DRUG GROUP (TA2,TA5,TE3,TR15,TR20)"

    Thanks for asking

  11. #11
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Is this doable with excel? Categorizing by pattern?

    Please try at F2 and drag down

    =LOOKUP(2,1/(MMULT(N(ISNUMBER(SEARCH(INDEX($E$2:$E$99,N(IF(1,MATCH(1,INDEX(1/($A$2:$A$99=A2),),{0,1})))),MID(SUBSTITUTE($I$13:$I$15,">",REPT(" ",100)),{1,201},100)))),{1;1})=2),$H$13:$H$15)
    Attached Files Attached Files

  12. #12
    Registered User
    Join Date
    03-14-2019
    Location
    Korea
    MS-Off Ver
    MS Office 2013
    Posts
    7

    Re: Is this doable with excel? Categorizing by pattern?

    Hello Bo!

    That is one BIG formula but it works!

    Will apply it to the master file and let you know!

    You gave me hope!
    Thank you so so much!

    Claudia

+ 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. Is this doable with Excel Macros: Retrieve data from Yahoo Finance Stock into Excel
    By HamzaAliAhmad in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-19-2014, 05:18 PM
  2. [SOLVED] Copying XL reports from sub-folders to a dedicated folder using VBA. Is this doable?
    By Ilikeideas in forum Excel Programming / VBA / Macros
    Replies: 52
    Last Post: 05-20-2013, 03:32 PM
  3. [SOLVED] Excel calendar with Appointment. Is this doable?
    By jjin in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-16-2013, 09:38 AM
  4. Draft bulk mails automatically on Gmail from Excel 2007. Doable?
    By Ilikeideas in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 02-01-2013, 02:46 PM
  5. Is this userform doable? i'm in over my head :eek:
    By teacher_rob in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-10-2011, 07:02 PM
  6. Massive Excel Challenge- Is it doable?
    By greekboyuk in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-05-2011, 06:14 PM
  7. [SOLVED] Categorizing an excel column
    By Anna in forum Excel General
    Replies: 2
    Last Post: 07-15-2005, 03:05 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