Sub AATest1()
Dim num As Long
Dim res As Variant
Dim sStr As String
res = InputBox("enter number of characters")
If res = "" Then Exit Sub
If Not IsNumeric(res) Then Exit Sub
num = res
For Each cell In Selection
sStr = cell.Text
sStr = Right(sStr, Len(sStr) - num)
cell.Value = sStr
Next
End Sub
--
Regards,
Tom Ogilvy
"ali" wrote in message
...
Hey everyone,
Do any of you know a macro that will allow me to delete the first 'n'
characters of a cell? Basically i get sent data that often has varying
amounts of useless data in front of the data i need and i need to find
a way to clean it up!
I will need to be able to enter the number of leading characters to
remove from the cell but don't have the first idea how to create
anything like this?
Thanks guys (and girls!)
---
Message posted from http://www.ExcelForum.com/