Posts by victorjagu

    Thanks Carim. It looks pretty what I need. :)

    Now I have to study your formula to understand it hehe.

    I will try it on the real project to see if the array formula is too heavy for calculate all that rows or if it works as good as in the test file.

    Either way, thank you very much for your time and explanations.

    Have a very nice day!


    Cell B5 has no value.

    I know how to do it with a macro, but I need to be done by a formula, that is why I was trying with countifs.

    If you can't come up with a way of solving this by a formula then it's ok, don't worry, you have helped me quite a lot. I know that not everything can be solve with just formulas ?

    Ok, thanks a lot man, now I see why it is not working for my purposes. Quite obvious right now that I see it haha

    Then, how can I count how many unique brokers are there for every item in column C? (I think is what you purpose in the beginning about counting unique items with multiple criterias).

    I mean, I should reach the following results:

    • Mr1a = 1
    • Rc2a = 3
    • Ig3a = 1


    Hi Carim,

    No because, as I said, for the item mr1a there is only one broker which is the same for all of them (broker1), so there are 0 different brokers than "broker1" for that item (mr1a).

    Sorry, I don't know how to explain it better...


    Hi Carim,

    Thanks for answering :)

    I don't know why it is not applicable in this case, but if I can achieve it with other formulas is ok.

    I want to know, for every item in column C, how many different items are in column B (your first pointing).

    In the end, I need to have the following results:

    • mr1a = 0, because mr1a in column C has the same item in column B (e.g. "Broker1")
    • ig3a = 0
    • rc2a = 3, because for rc2a we have the following unique items in column B (a blank cell, "broker2" and "broker3").

    Another requirement is that I can't add auxiliary columns to the table...

    Any approaches to the goal?


    Hello everyone,

    I'm trying to count how many items are diffent and I get an unexpected number in some of them. I attached a test file, but here is an image also to explain what I want:

    Have a look at "rc2a" in yellow. I'm trying to count how many "broker" (in green) are different for "rc2a" (yellow).

    I understand the "3" results (a blank cell, "broker2" and "broker3"), but I can't figure out why sometimes excel says "2" as a valid solution.

    Any ideas?

    Thanks a lot,


    This is simply amazing, it helps me a lot. Thank you very much for sharing!!!

    Can I ask if it's possible to move the blank items in the 2D-array ("") to the end instead of the very beginning?

    Either way, thank you for this great job!!!