+ Reply to Thread
Results 1 to 6 of 6

Count unique value with criteria & condition

  1. #1
    Forum Contributor
    Join Date
    07-27-2017
    Location
    Dhaka
    MS-Off Ver
    MS Excel 2019/ 64 bit
    Posts
    159

    Count unique value with criteria & condition

    Dear Expert,
    in my worksheet table (A1:C15) column A is date, B is item & C is quantity.

    Formula 1:
    I need a formula on F2 to get the unique value from column A considering E2 value.
    Like E2 is May-2020, so i need result on F2 from A column unique date month of May-2020. but at calculation Column A unique date month of May-2020 should consider column C valid value. that means if column C any row will blank or Zero then that row column A is not come on my calculation.

    Formula 2:
    I need another formula on G5 which is also similar with Formula 1 But here i need result based on Criteria which is on F5 & my criteria range is column B & E5 is same like E2.

    I have attached my sample worksheet where F2 & G5 i do manually for your ref.

    Please help me in this regards.


    Best Regards
    Wahid
    Attached Files Attached Files

  2. #2
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,481

    Re: Count unique value with criteria & condition

    Try:
    Please Login or Register  to view this content.
    **Array formulas are not entered in the same way as 'standard' formulas. Instead of pressing just ENTER, you first hold down CTRL and SHIFT, and only then press ENTER. If you've done it correctly, you'll notice Excel puts curly brackets {} around the formula (though do not attempt to manually insert these yourself).

    Please Login or Register  to view this content.
    Array formula too

    Though, my first formula counts 4 while yours is 3. Checking again, I see 4 is correct (in row 2,4,10,11)
    Quang PT

  3. #3
    Forum Contributor
    Join Date
    07-27-2017
    Location
    Dhaka
    MS-Off Ver
    MS Excel 2019/ 64 bit
    Posts
    159

    Re: Count unique value with criteria & condition

    Quote Originally Posted by bebo021999 View Post
    Try:
    Please Login or Register  to view this content.
    **Array formulas are not entered in the same way as 'standard' formulas. Instead of pressing just ENTER, you first hold down CTRL and SHIFT, and only then press ENTER. If you've done it correctly, you'll notice Excel puts curly brackets {} around the formula (though do not attempt to manually insert these yourself).

    Please Login or Register  to view this content.
    Array formula too

    Though, my first formula counts 4 while yours is 3. Checking again, I see 4 is correct (in row 2,4,10,11)
    Dear Expert,
    Your formula is working properly but in formula 1 i dont need any relation with column B that was not required at post 1, thats why count mismatch between you and me. Please revise formula 1 without any relation with column B & other as is.

    Formula 2 also i am describing again with details: first E5 will match the range Column A then F5 will match the column B then G5 will count how many unique data on column A considering last 2 condition except Column C blank or Zero value.

    Please pay your valued attention.
    Thanks
    Last edited by rachelwahid; 05-29-2020 at 06:03 AM. Reason: Adding more details

  4. #4
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,481

    Re: Count unique value with criteria & condition

    Quote Originally Posted by rachelwahid View Post
    Dear Expert,
    Your formula is working properly but in formula 1 i dont need any relation with column B that was not required at post 1, thats why count mismatch between you and me. Please revise formula 1 without any relation with column B & other as is.
    OK try to replace range B by A:
    Please Login or Register  to view this content.

  5. #5
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,481

    Re: Count unique value with criteria & condition

    Similar to formula 2 replace range C with range A:
    Please Login or Register  to view this content.

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

    Re: Count unique value with criteria & condition

    Please try at
    F2
    =COUNT(1/FREQUENCY(IF((TEXT(A2:A15,"my")=TEXT(E2,"my"))*(C2:C15>0),A2:A15),A2:A15))

    G2
    =COUNT(1/FREQUENCY(IF((TEXT(A2:A15,"my")=TEXT(E5,"my"))*(C2:C15>0)*(B2:B15=F5),A2:A15),A2:A15))

    **Array formulas are not entered in the same way as 'standard' formulas. Instead of pressing just ENTER, you first hold down CTRL and SHIFT, and only then press ENTER. If you've done it correctly, you'll notice Excel puts curly brackets {} around the formula (though do not attempt to manually insert these yourself).
    Attached Files Attached Files

+ 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. two condition before count unique text value.
    By Ensaac in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-28-2019, 09:00 PM
  2. [SOLVED] Count for unique value with condition
    By rchure in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 02-12-2018, 08:15 AM
  3. Need help - Count unique value that matches given condition
    By Mintha in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 06-02-2016, 09:19 AM
  4. How to Get Unique count with Multiple Condition.
    By jhabijay_10 in forum Excel General
    Replies: 1
    Last Post: 01-02-2015, 08:55 AM
  5. [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
  6. Replies: 8
    Last Post: 01-30-2013, 02:58 PM
  7. Count Condition Unique Items
    By Gos-C in forum Excel General
    Replies: 15
    Last Post: 01-23-2009, 10:14 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