+ Reply to Thread
Results 1 to 11 of 11

1 for unique value, 0 for non-unique, based on row P filtered on row I

  1. #1
    Registered User
    Join Date
    07-06-2022
    Location
    Netherlands
    MS-Off Ver
    365
    Posts
    4

    1 for unique value, 0 for non-unique, based on row P filtered on row I

    Hey all,

    I've been struggling with excel and can't quite seem to get this right.
    I want to get a 1 for each unique value in row M, and a 0 for each non-unique value based on the value in row K, filtered on the value in row I.

    Example:
    Row I has an ID, per this ID several assets are used, these assets are categorized in row M. Certain ID's in row I have used a certain asset in row M several times. I only want to count 1 of these, and not several.

    Can anyone be of help here?
    Attached Files Attached Files
    Last edited by varyen; 07-06-2022 at 11:45 AM.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,882

    Re: 1 for unique value, 0 for non-unique, based on row P filtered on row I

    Fast answers need visual help. Please read the yellow banner at the top of this page on how to attach a file.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    07-06-2022
    Location
    Netherlands
    MS-Off Ver
    365
    Posts
    4

    Re: 1 for unique value, 0 for non-unique, based on row P filtered on row I

    Thanks for the comment, updated the post with a small visual

  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
    80,799

    Re: 1 for unique value, 0 for non-unique, based on row P filtered on row I

    A workbook, please, not a screenshot of it. 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.

  5. #5
    Registered User
    Join Date
    07-06-2022
    Location
    Netherlands
    MS-Off Ver
    365
    Posts
    4

    Re: 1 for unique value, 0 for non-unique, based on row P filtered on row I

    Thank you, removed the screenshot and added the workbook.

  6. #6
    Valued Forum Contributor
    Join Date
    07-23-2013
    Location
    London, England
    MS-Off Ver
    Office 365
    Posts
    988

    Re: 1 for unique value, 0 for non-unique, based on row P filtered on row I

    Try in M2, copied down:

    =IF(COUNTIFS($I$2:I2,I2,$K$2:K2,K2)>1,0,1)
    Attached Files Attached Files

  7. #7
    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
    80,799

    Re: 1 for unique value, 0 for non-unique, based on row P filtered on row I

    In M2 copied down:

    =IF(COUNTIFS($I$2:$I$18,I2,$K$2:$K$18,K2)=1,1,0)

    For a Dutch locale:

    =IF(COUNTIFS($I$2:$I$18;I2;$K$2:$K$18;K2)=1;1;0)

  8. #8
    Valued Forum Contributor
    Join Date
    07-23-2013
    Location
    London, England
    MS-Off Ver
    Office 365
    Posts
    988

    Re: 1 for unique value, 0 for non-unique, based on row P filtered on row I

    @Ali, not sure that works, think $I$18 needs to be I2 and $K$18 needs to be K2?

  9. #9
    Registered User
    Join Date
    07-06-2022
    Location
    Netherlands
    MS-Off Ver
    365
    Posts
    4

    Re: 1 for unique value, 0 for non-unique, based on row P filtered on row I

    This worked perfectly, thank you for the quick solve!

  10. #10
    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
    80,799

    Re: 1 for unique value, 0 for non-unique, based on row P filtered on row I

    Glad to have helped.

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

    Thanks for the rep.

  11. #11
    Valued Forum Contributor
    Join Date
    07-23-2013
    Location
    London, England
    MS-Off Ver
    Office 365
    Posts
    988

    Re: 1 for unique value, 0 for non-unique, based on row P filtered on row I

    Happy to help

+ 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] Transpose data in six columns into unique and multiple rows based on unique club name
    By JimmyB11 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-04-2021, 09:12 AM
  2. [SOLVED] Filter Data Based on Unique Column Items and Save the Workbook with Filtered Items
    By IonutC in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-18-2019, 03:08 AM
  3. [SOLVED] FREQUENCY of unique value and SUM of unique values based on criteria
    By dcathey5 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-05-2017, 11:02 AM
  4. Create unique # of worksheets based on list count with unique names
    By Groovicles in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-24-2016, 09:51 AM
  5. [SOLVED] A lookup function based on two criteria; one unique & one not unique to the lookup table
    By Trevasaurus in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-18-2014, 11:35 AM
  6. [SOLVED] Count unique entries based off unique criteria in another column
    By hambly in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 06-11-2014, 03:33 PM
  7. Replies: 2
    Last Post: 02-06-2013, 04:44 AM

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