user3313434
user3313434

Reputation: 1

remove duplicate value but keep rest of the row values in excel

I have report for a project which needs to be filtered based on the first column. There are several people working with same project on several dates.

ProjectName People  Dates
XYZ           KK    01/03/2014
XYZ           KY    02/03/2014
ABC           LL    03/03/2014
ABC           LY    04/03/2014
BBC           XY    05/03/2014
BBC           XY    06/03/2014
CBA           XX    07/03/2014
DBC           XX    08/03/2014
DDD           XX    09/03/2014
DDD           XY    10/03/2014
DDD           XX    11/03/2014

And the report I am looking should look as below:

ProjectName      People    Date
XYZ            KK      01/03/2014
               KY      02/03/2014
ABC            LL      03/03/2014
               LY      04/03/2014
BBC            XY      05/03/2014
               XY      06/03/2014
CBA            XX      07/03/2014
DBC            XX      08/03/2014
DDD            XX      09/03/2014
               XY      10/03/2014
               XX      11/03/2014

Thanks in Advance

Upvotes: 0

Views: 10230

Answers (2)

Dmitry Pavliv
Dmitry Pavliv

Reputation: 35863

There is easy non VBA way:

  • Step 1

add formula =A3=A2 in additional column in D3 starting from the second row of your data (see picture below)

enter image description here

  • Step 2

Select headers (range A1:D1 in the picture below) and apply autofilter (go to DATA->FILTER).

enter image description here

  • Step 3

Filter out column D with criteria =TRUE

enter image description here

  • Step 4

Select values in column A

enter image description here

  • Step 5

With selected range press Del

enter image description here

  • Result

Remove autofilter and temporary column D

enter image description here

Upvotes: 1

Gary's Student
Gary's Student

Reputation: 96791

Give this tiny macro a try:

Sub luxation()
    Dim N As Long
    N = Cells(Rows.Count, 1).End(xlUp).Row
    For i = N To 2 Step -1
        If Cells(i, 1) = Cells(i - 1, 1) Then
            Cells(i, 1) = ""
        End If
    Next i
End Sub

Upvotes: 1

Related Questions