+ Reply to Thread
Results 1 to 3 of 3

Assign values to categories of values based on separate column attribute.

  1. #1
    Registered User
    Join Date
    01-02-2017
    Location
    Atlanta, GA
    MS-Off Ver
    professional plus 2016
    Posts
    2

    Assign values to categories of values based on separate column attribute.

    I have a large table of records some of which appear more frequently than others. I need a formula that will assign different values to each record depending on whether the test result is "positive" or "negative". Specifically, if a given record has ever tested positive, I want to flag it (and all its test entries) as an exclusion (e.g., records 2 and 4 in the example below). Conversely, if it has never tested positive, I want to include it and all its entries (e.g., records 1 and 3). I realize this will result in decision outcomes that are repeated for a single record, and that's okay.

    Record_ID Test Result Decision
    1 negative include
    2 negative exclude
    2 negative exclude
    2 positive exclude
    3 negative include
    3 negative include
    4 positive exclude

  2. #2
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,908

    Re: Assign values to categories of values based on separate column attribute.

    Try this ...

    =IF(COUNTIFS($A$2:$A$8,A2,$B$2:$B$8,"positive"),"exclude","include")

  3. #3
    Registered User
    Join Date
    01-02-2017
    Location
    Atlanta, GA
    MS-Off Ver
    professional plus 2016
    Posts
    2

    Re: Assign values to categories of values based on separate column attribute.

    It works like a charm, thank you!

+ 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. [SOLVED] Help Required: Assign Values to Categories
    By Aerodynamix in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 12-08-2015, 01:09 PM
  2. [SOLVED] Unable to assign values to categories - Rules based formula help required
    By Aerodynamix in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-21-2015, 12:40 PM
  3. Replies: 1
    Last Post: 11-05-2013, 11:22 AM
  4. [SOLVED] assign values to categories
    By Neico in forum Excel General
    Replies: 3
    Last Post: 10-03-2013, 03:44 PM
  5. Replies: 0
    Last Post: 03-21-2013, 11:49 AM
  6. Assign multiple values to XML attribute
    By Barryt0 in forum Excel General
    Replies: 0
    Last Post: 01-16-2013, 12:43 PM
  7. Sum Values Based on Categories in Different Column
    By BScott22 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-27-2010, 06:54 PM

Tags for this Thread

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