

In the example above, cell K3 contains the following formula. However, it can also work on a horizontal list. Example 4 – Using UNIQUE across columnsīy default, Excel assumes UNIQUE should be applied on a vertical list. These are the ranges that have been returned within the spill range. The formula in cell G3 is: =UNIQUE(CHOOSE(,E3:E10,B3:B10))īy using CHOOSE, we have defined the first array as E3-E10 and the second array as B3-B10. In this circumstance, we can use the CHOOSE function to reorder the columns. Sometimes we want a unique list with two columns that are not next to each other. The formula in cell G3 is: =UNIQUE(B3:B10&" "&C3:C10)Īgain, one instance of Chau Yang has been removed to provide a unique list within a single column. The second method uses functionality from the new calculation engine to concatenate columns together before applying the UNIQUE function. One instance of Chau Yang has been excluded as it appears twice in the source list. This includes the First and Last name columns in the array and returns both in the result. The formula in cell G3 is: =UNIQUE(B3:C10) This returns the unique list and retains the same number of columns as included in the first argument. UNIQUE is not restricted to a single column. The formula in cell G3 is: =UNIQUE(tblExam)Īs the UNIQUE function is referencing the entire column, when the column expands or retracts, so does the result of the formula. Notice that the spill range of the UNIQUE function updates as soon as new items are added to the table. When a new record is added, UNIQUE automatically expands to include the additional value in the spill range.

Example 2 – UNIQUE linked to an Excel tableĮxample 2 shows how UNIQUE responds when linked to an Excel table. My guess is that in most situations, we will be using the distinct version of UNIQUE, which is the default option anyway.

The third argument is TRUE, therefore UNIQUE will return the results which appear only once in the array. The formula in cell G3 is: =UNIQUE(B3:B10,TRUE) Sally, Jack, Billy, Ryan, Chau and David all appear in cells B3-B10 therefore, we get a list of all those names. The formula in cell C3 is: =UNIQUE(B3:B10)Īs the third argument has not been used, exactly_once has defaulted to FALSE and therefore shows a list of distinct results. The last argument of the UNIQUE function determines if it returns a distinct or unique list. Example 1 – The difference between unique and distinct
#Transpose excel 365 how to#
The following examples illustrate how to use the UNIQUE function. The impact of this is demonstrated in Example 1.

This is an optional argument and if excluded, will default to FALSE. If you want a list that contains one instance of each item (i.e., a distinct list), then use FALSE. If you want a list that includes only the items that appear once, then use TRUE.
