PDA

View Full Version : VBA to format selected range



swaggerbox
09-03-2015, 03:49 AM
How do I modify the macro below so that the last character in each cell of the selected range is removed and not just read in a msgbox. Sorry I'm a mess with VBA.




Sub FormatPatentNum()


For Each cell In Selection
cell = Left(cell, Len(cell) - 1)
MsgBox cell
Next cell


End Sub

jolivanes
09-03-2015, 07:43 AM
Remove the line

MsgBox cell

swaggerbox
09-03-2015, 08:29 PM
thanks jolivanes!