Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
deleting a cell from series , why the series gets disturbed? | Excel Worksheet Functions | |||
add leading character | Excel Discussion (Misc queries) | |||
Need to add character before leading zero in a field | Excel Discussion (Misc queries) | |||
How do I force a leading zero character eg 07817 | Excel Discussion (Misc queries) | |||
Dropping leading zeros in character fields. | Excel Programming |