Hoping someone can help. I currently have the attached code I found online to replace spaces with "". Can someone help as to how I can modify this code to only replace the spaces with "" for a specific range (C6:G132) in my spreadsheet. Right now it looks like it is looking at all cells in the active sheet. I am just not sure how to go about doing it. Still fairly new to VB. Thanks for your help in advance.
Sub TrimSpaces()
Dim cell As Range
For Each cell In ActiveSheet.UsedRange.SpecialCells(xlCellTypeConstants)
cell = WorksheetFunction.Trim(Replace(cell.Value, Chr(32), ""))
Next cell
End Sub
Sub TrimSpaces()
Dim cell As Range
For Each cell In ActiveSheet.UsedRange.SpecialCells(xlCellTypeConstants)
cell = WorksheetFunction.Trim(Replace(cell.Value, Chr(32), ""))
Next cell
End Sub