Data Processing & Cleanup
Remove duplicates, clean data formats, and standardise entries
Perfect For:
- Remove duplicate entries
- Standardise text formatting
- Clean imported data
PRO Template
Sign up for free to unlock the complete VBA code and access all templates
Sub CleanDataRange()
Dim ws As Worksheet
Dim lastRow As Long
Dim i As Long
Set ws = ActiveSheet
lastRow = ws.Cells(ws.Rows.Count, "A").End(xlUp).Row
' Remove duplicates
ws.Range("A1:C" & lastRow).RemoveDuplicates Columns:=Array(1, 2, 3), Header:=xlYes
' Clean up text formatting
For i = 2 To lastRow
ws.Cells(i, 1).Value = Trim(UCase(ws.Cells(i, 1).Value))
ws.Cells(i, 2).Value = Trim(ws.Cells(i, 2).Value)
' ... 4 more lines hidden ...
'
' Sign up for free to view the complete code
' Visit: vbacode.io
Related Topics
Need Custom VBA Solutions?
Our AI-powered VBA generator can create custom code tailored to your specific requirements in seconds.
3 free generations/month — unlimited with Pro
Related Templates
More VBA templates in the same category
Timesheet & Attendance Tracker
Track employee working hours, overtime, absences, and holidays with automatic calculations, weekl...
View TemplateData Entry Form with Validation
Professional UserForm-based data entry system with field validation, dropdown lists, date pickers...
View TemplateCreate Sheet Per Unique Value
Automatically create separate worksheets for each unique value in a column. Perfect for splitting...
View Template