Macro

  • Thread starter Thread starter Jemima
  • Start date Start date
J

Jemima

Hi,
I am trying to write a simple macros to work down a column and delete the
final 3 characters in the Cell.
Any ideas?
Many thanks
 
Jemima,

Right click the sheet tab, view code and paste this in

Sub stance()
Lastrow = Cells(Cells.Rows.Count, "A").End(xlUp).Row 'Change to suit
Set myrange = Range("A1:A" & Lastrow)
For Each c In myrange
On Error Resume Next
c.Value = Left(c.Value, Len(c.Value) - 3)
Next
End Sub

Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top