• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Get all unique values in a column based on the values in another two columns.

Lazar

New Member
Hello,

I am trying to filter out all unique values in a column based on the values in another 2 columns. For example if you have a number of in the first column - shop Shop A, Shop B and Shop C, etc. and you would like to get in a column which one of those is open. In the second column you have the opening time for instance 9:00am or 10:00am and in the third column you have the working days of each shop. I would like to filter out with array formula the results from the first column by using two cells which should be in the condition(one of the cells referencing all possible results from the second column and the second one referencing the results from the third column). This is a similar expression but with one condition: https://www.extendoffice.com/documents/excel/5014-excel-populate-rows-based-on-cell-value.html. In addition this condition seems for some reason to leave blank cells in the array result. For instance populated are only the 1st the 3rd and the 6th cell in the column. Hence there are some blanks in between.
 
I have just figured it out myself :)

=IFERROR(INDEX($C$2:$C$5000, SMALL(IF(COUNTIF($E$4, $B$2:$B$5000), ROW($C$2:$C$5000)-MIN(ROW($C$2:$C$5000))+1), ROW(A1)), COLUMN(A1)),"")
 
Back
Top