+ Reply to Thread
Results 1 to 4 of 4

Query to Return Results Based on Specific Criteria

  1. #1
    Registered User
    Join Date
    08-06-2018
    Location
    UK
    MS-Off Ver
    2010
    Posts
    7

    Query to Return Results Based on Specific Criteria

    Hi,

    I work with a chemotherapy prescribing system and would like to identify regimes that are Oral only (none intravenous). Some regimes include both, or are IV only.

    I have a sheet with 2 columns, A gives prescription name and B gives route i.e. Oral/IV. An example:

    Rx 1 Oral
    Rx 1 IV
    Rx 2 Oral
    Rx 3 IV
    Rx 4 Oral
    Rx 4 IV

    I need a query that would only return Rx 2 - in my example, Rx 2 is the only one to have Oral and no other routes associated.

    Is this possible in Excel?

    Many thanks
    Last edited by AliGW; 01-03-2019 at 09:35 AM.

  2. #2
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent SAC
    Posts
    8,885

    Re: Unsure how to ask this

    You could add a new column with a formula like:

    =COUNTIFS(A:A,A2,B:B,"IV")=0

    (I've assumed row 2 is the first data row)

    and then filter the new column for TRUE values.
    Rory

  3. #3
    Registered User
    Join Date
    08-06-2018
    Location
    UK
    MS-Off Ver
    2010
    Posts
    7

    Re: Unsure how to ask this

    Thank you for such a quick answer. Solved!
    Last edited by AliGW; 01-03-2019 at 09:35 AM.

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,349

    Re: Unsure how to ask this

    In future, please use more informative thread titles, along the lines of the amendment made above. Thanks.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

+ 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. Vba MATCH? unsure
    By jet2004uk in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-14-2013, 07:29 AM
  2. unsure what to do
    By scorpio_witch in forum The Water Cooler
    Replies: 17
    Last Post: 08-01-2013, 12:49 AM
  3. unsure what to do
    By scorpio_witch in forum Excel General
    Replies: 3
    Last Post: 07-30-2013, 07:34 PM
  4. [SOLVED] unsure of IF statement
    By sunswan in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-26-2013, 08:25 PM
  5. AND - Unsure how to use it
    By Strathcona in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-18-2009, 05:53 PM
  6. Unsure of how to do this..
    By karleen77 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-23-2007, 10:23 PM
  7. Im unsure...do you know?
    By genuinegal in forum Excel General
    Replies: 6
    Last Post: 12-21-2006, 12:20 PM

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