delete duplicate data in the same column

mali10020

New Member
Joined
Oct 15, 2021
Messages
17
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
  2. Mobile
Good morning!!

Can you please help!!

I wrote this code but I keep geting error
1635085358486.png


I want to assign this code to pacific sheet the sheet name is Devices names.

Sub Final2()
'
' Final Macro
'

'
Workbooks("Mobile devices report").Worksheets("Devices list").Range("A1:A10000").Replace ".mcd.pri", "", LookAt:=xlPart

Columns("A:A").Select
Selection.TextToColumns Destination:=Range("A1"), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=False, _
Semicolon:=False, Comma:=True, Space:=False, Other:=False, FieldInfo _
:=Array(Array(1, 1), Array(2, 9), Array(3, 9), Array(4, 9), Array(5, 9), Array(6, 9), _
Array(7, 9), Array(8, 9), Array(9, 9), Array(10, 9), Array(11, 9), Array(12, 9)), _
TrailingMinusNumbers:=True
Selection.Replace What:=" ", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False



End Sub

Thank you!
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
the sheet name is Devices names

Workbooks("Mobile devices report").Worksheets("Devices list").Range("A1:A1
 
Upvote 0
Workbooks("Mobile devices report").Worksheets("Devices list").Range("A1:A1
I already fixed the name of the sheet but still not working I'm getting the same error

Workbooks("Mobile devices report").Worksheets("Devices list").Range("A1:A10000").Replace ".mcd.pri", "", LookAt:=xlPart
 
Upvote 0
Post your workbook on a download site so it can be reviewed. Do not include any confidential data.

Post the download link.
 
Upvote 0
Solution

Forum statistics

Threads
1,224,744
Messages
6,180,697
Members
452,994
Latest member
Janick

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