MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Easy macro problem PLEASE HELP ME!!!!!!!!!!!!!!!!!!


Posted by Lucy Harris on September 26, 2000 5:54 AM

Im having trouble making a macro to run through a huge list of postcodes I have, and delete all but the first two letters of each postcode
eg: DE7 6EF becomes DE
this will be a great help as the list is about 5000 postcodes long, (and you will save my ("student on a work placement") ass!!
Thanks alot!


Posted by David on September 26, 2000 6:24 AM

Sub hello()
y = 1
For x = 1 To 5000
Cells(x, y) = Left(Cells(x, y), 2)
Next x
End Sub

try something to this effect