![]() |
Deleting the leading character in a series of cells
Is there a way to program a deletion in a series of cells?
I have rows of data that start with a underscore and I want to find an efficient way to delete them. Any suggestions? For example: A _40295 _40296 _9000143 _60000 I thought I could use a macro, but it only takes the value "40295" and copies it in every cell. Thanks for your help. Alex |
Deleting the leading character in a series of cells
You could use the Replace function (ctrl-h) and put the underscore i
the find box and nothing in the replace box. Then just replace all. Another option to strip the first character using: =Right(A1,Len(A1)-1) in a new column. Then copy the column and paste special to clear th formulas. I'd also give a macro example, but that would be overkill... -- Message posted from http://www.ExcelForum.com |
Deleting the leading character in a series of cells
If you only have the ONE _ underscore, the fastest would be with this
recorded macro. Sub Macro6() ' ' Macro6 Macro ' Macro recorded 6/24/2004 by Don Guillett ' ' Range("E1:E4").Select Selection.Replace What:="_", Replacement:="", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _ ReplaceFormat:=False End Sub -- Don Guillett SalesAid Software "Alex" wrote in message ... Is there a way to program a deletion in a series of cells? I have rows of data that start with a underscore and I want to find an efficient way to delete them. Any suggestions? For example: A _40295 _40296 _9000143 _60000 I thought I could use a macro, but it only takes the value "40295" and copies it in every cell. Thanks for your help. Alex |
All times are GMT +1. The time now is 07:24 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com