How to copy across the first unique value

skoorBmaS

New Member
Joined
Feb 5, 2016
Messages
34
I'm sure that this is already plenty of threads for this, but I'm not sure how to explain what I wish to achieve. Currently I have a list which has a description in. I want this referenced in another table, however I want all the descriptions which match to be grouped together. For example,

Description
Cat
Cat
Cat
Dog

<tbody>
</tbody>

The formula I am currently using is =IF(A2=A3,"-", A2)

This works fine however it will place the word dog in the fourth cell, rather than the second cell which is what I wish to achieve. So the formula should take each unique value and enter them into neighboring cells (E1,F1,G1 etc.)

Hope this makes sense.
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
I'm sure that this is already plenty of threads for this, but I'm not sure how to explain what I wish to achieve. Currently I have a list which has a description in. I want this referenced in another table, however I want all the descriptions which match to be grouped together. For example,

Description
Cat
Cat
Cat
Dog

<tbody>
</tbody>

The formula I am currently using is =IF(A2=A3,"-", A2)

This works fine however it will place the word dog in the fourth cell, rather than the second cell which is what I wish to achieve. So the formula should take each unique value and enter them into neighboring cells (E1,F1,G1 etc.)

Hope this makes sense.

Something like this:

=IFERROR(INDEX($A$2:$A$5, MATCH(0, COUNTIF($C$1:C1, $A$2:$A$5), 0)),"")

It is an array so control + shift + enter and drag down

Ive entered this into C2 and assumed your data is from A2 to A5 so adjust as needed.
 
Last edited:
Upvote 0
Just noticed you were dragging right which would mean you would need to change the section in the countif. Redone to drag right it would be:

=IFERROR(INDEX($A$2:$A$5, MATCH(0, COUNTIF($B$2:B2, $A$2:$A$5), 0)),"")
 
Upvote 0

Forum statistics

Threads
1,215,432
Messages
6,124,857
Members
449,194
Latest member
HellScout

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top