Home » excel » How to populate columns with data in Excel using unique row combinations between two columns

How to populate columns with data in Excel using unique row combinations between two columns

Posted by: admin May 14, 2020 Leave a comment

Questions:

This seems like it should be easy enough to do, but I can’t seem to figure it out or find a tutorial.

I have two columns containing values. I would like the unique column combinations to repeat in another set of columns, and count the instances.

COLUMN A COLUMN B             COLUMN C COLUMN D COLUMN E
John     Apples               John     Apples   2
John     Apples               John     Bananas  1
John     Bananas              Sara     Apples   1
Sara     Apples               Sara     Kiwi     1
Sara     Kiwi                 Mike     Carrots  2
Mike     Carrots              Mike     Kiwi     1
Mike     Carrots                       Apples   2
Mike     Kiwi                          Carrots  1
         Apples                        Kiwi     1
         Apples
         Carrots
         Kiwi

I was able to transfer the unique values from one column to another using INDEX and MATCH, but can’t get it to work with two columns.

This tutorial shows what I am looking for, but I’d like the second set of data to stay in a column, and not transpose into rows. https://www.extendoffice.com/documents/excel/3358-excel-transpose-unique-values.html

How to&Answers:

Try following this short animated screen capture finishing with the following formula in E2.

=COUNTIFS(A:A, IF(LEN(C2), C2, ""), B:B, D2)

enter image description here

Answer:

What you describe is called a Pivot Table. Drag Name and Fruit into the rows area and Fruit again into the Values area to have it counted. Pivot tables can have different layouts, i.e. with repeating labels, or in compact format.

enter image description here