Tips for writting macro in Excel

Closed
Abhi - Apr 17, 2009 at 12:50 AM
phdhopes Posts 21 Registration date Wednesday September 17, 2008 Status Member Last seen May 11, 2009 - Apr 17, 2009 at 04:55 AM
Hello,

I have one excel file which contains more than 15000 records. for one column i need to find and replace (ex : -500 to 0) number starting with - to 0. Can any one help in this.?


Regards
Abhishek
Related:

1 response

phdhopes Posts 21 Registration date Wednesday September 17, 2008 Status Member Last seen May 11, 2009 2
Apr 17, 2009 at 04:55 AM
try this:

With Activesheet

LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row

For i = 1 To LastRow

.Cells(i, "A").Value = Right(.Cells(i, "A").Value, Len(.Cells(i, "A").Value)-1)
Next i
End With
0