REMOVE DUPLICATE BY SINGLE (STRING) ROWS

pinmounir77

New Member
Joined
Jan 15, 2023
Messages
1
Office Version
  1. 2013
Platform
  1. Windows
Heyy there,

My problem is : i cant remove duplicate column by single string

I want script or marco or anythink (automation) to fix this problem

Take look of screenshot of my solution what i need

Thank you every one who fix that :D


z4a.PNG
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
VBA Code:
Sub iskop()
        Dim rng, rng2 As Range
        Set rng = Application.InputBox(prompt:="Hello, Please enter your range", Default:=Selection.Address, Type:=8)
        Dim i, p, k, j As Integer
        Dim v
      
      
        For p = 1 To rng.Columns.Count
                For i = 1 To rng.Rows.Count
                      If rng(i, p) = "" Then GoTo nextit
                      For j = p + 1 To rng.Columns.Count
                            For k = 1 To rng.Rows.Count
                                If rng(k, j) = rng(i, p) Then rng(k, j).Clear
                            Next k
                      Next j
nextit:
                Next i
        Next p
       ' remove the below lines if you don't want the cells to be shifted to left
        For Each rng2 In rng
                If rng2 = "" Then
                    rng2.Cells.Delete xlToLeft
                End If
        Next rng2
      
End Sub
 

Attachments

  • 1673789924992.png
    1673789924992.png
    17.8 KB · Views: 19
Upvote 0

Forum statistics

Threads
1,223,884
Messages
6,175,173
Members
452,615
Latest member
bogeys2birdies

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