I have written code to remove/trim the trailing spaces in Col A & B on sheet 2
Eg BR1 Shirt Sales
in this eg remove space/s only after sales
The macro trims the data in Col A , but not in Col B
It would be appreciated if someone could kindly assist me
Eg BR1 Shirt Sales
in this eg remove space/s only after sales
The macro trims the data in Col A , but not in Col B
It would be appreciated if someone could kindly assist me
Code:
Sub TrimtrailingSpaces()
Sheets(2).Select
FirstRow = 1
LastRow = Cells(Rows.Count, 1).Resize(, 2).End(xlUp).Row
For Each cell In Range(Cells(FirstRow, 1), Cells(LastRow, 1))
cell.Value = Trim(cell.Value)
Next cell
End Sub