Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Please help
is there a way to run a command of macro that will delete the 1st 17 characters of a cell that is selected? Thanks |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Maybe
Sub marine() If Len(ActiveCell.Value) 16 Then ActiveCell.Value = Mid(ActiveCell.Value, 18, Len(ActiveCell.Value) - 17) End If End Sub Mike "shifty" wrote: Please help is there a way to run a command of macro that will delete the 1st 17 characters of a cell that is selected? Thanks |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thanks
Can you apply this to a range of cells when selecte in a column? "Mike H" wrote: Maybe Sub marine() If Len(ActiveCell.Value) 16 Then ActiveCell.Value = Mid(ActiveCell.Value, 18, Len(ActiveCell.Value) - 17) End If End Sub Mike "shifty" wrote: Please help is there a way to run a command of macro that will delete the 1st 17 characters of a cell that is selected? Thanks |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
try this
Sub marine() For Each c In Selection If Len(c.Value) 16 Then c.Value = Mid(c.Value, 18, Len(c.Value) - 17) End If Next End Sub Mike "shifty" wrote: Thanks Can you apply this to a range of cells when selecte in a column? "Mike H" wrote: Maybe Sub marine() If Len(ActiveCell.Value) 16 Then ActiveCell.Value = Mid(ActiveCell.Value, 18, Len(ActiveCell.Value) - 17) End If End Sub Mike "shifty" wrote: Please help is there a way to run a command of macro that will delete the 1st 17 characters of a cell that is selected? Thanks |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
If you have a column of this stuff, you could record a macro when you:
Select the range Data|Text to columns Fixed width remove any lines that excel guessed, but add a line between character 17 and 18. Choose to skip the first field Choose general or text or whatever you want for the second field. shifty wrote: Please help is there a way to run a command of macro that will delete the 1st 17 characters of a cell that is selected? Thanks -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort | Excel Worksheet Functions | |||
My excel macro recorder no longer shows up when recording macro | Excel Discussion (Misc queries) | |||
My excel macro recorder no longer shows up when recording macro | Excel Discussion (Misc queries) | |||
Macro needed to Paste Values and prevent Macro operation | Excel Discussion (Misc queries) | |||
Macro needed to Paste Values and prevent Macro operation | Excel Discussion (Misc queries) |