Results 1 to 20 of 39

Thread: Count the number if times a unique number appears in a list

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #17
    VBAX Regular
    Joined
    Sep 2023
    Posts
    77
    Location
    Quote Originally Posted by p45cal View Post
    How can ANY result be 0?!
    My results are a distinct count of container number for every MAWB/MBL



    This is a screenshot from my results; it looks like it's a 2.
    2024-04-12_114254.jpg

    Hi,

    You are correct but I need to total (sum) column C so I can obtain a count of unique container numbers, if I use your version I get incorrect values.

    I think I may have solved it myself here by using the below code

    =IF(COUNTIFS(B:B, B2,C:C,C2)>1,IF(COUNTIFS(B:B,B2,C:C,C2)>1,IF(COUNTIFS($B$2:B2, B2, $C$2:C2,C2)=1,1,0),""), 1)
    UPDATE!

    Actually this fails on some lines, unless I do a 'SORT' on column B in Ascending order, then formula works across all lines.

    Would be good to get this to work without the need to sort in ascending order each time though, any thoughts people?
    Attached Files Attached Files

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •