L
lightjag
I have a string of text in a single cell.
I need a macro to add the following to the end of the string:
1) word "(STOP)" and then ALT Enter {key stoke} to add carriage return.
ISSUE: The macro below adds the word "(STOP)" at the end of the string ,
but I need it to also add a "carriage retun" at the end of the string.
Sub EDIT()
'
' EDIT Macro
'
' this macro creates a name "stop" at the current cell location and then
copies the contents to a range name "copyto". At the stop location the macro
ref to "copyto" and then joins it with "(stop)" and finishes with paste
special values. NEED to add "Carriage Return" to this macro.
'
ActiveWorkbook.Names("stop").Delete
ActiveWorkbook.Names.Add Name:="STOP", RefersToR1C1:=ActiveCell
' "=Sheet1!R5C5"
Selection.Copy
Application.Goto Reference:="copyto"
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Application.Goto Reference:="STOP"
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "=copyto&"" (STOP)"""
Range("STOP").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
End Sub
I need a macro to add the following to the end of the string:
1) word "(STOP)" and then ALT Enter {key stoke} to add carriage return.
ISSUE: The macro below adds the word "(STOP)" at the end of the string ,
but I need it to also add a "carriage retun" at the end of the string.
Sub EDIT()
'
' EDIT Macro
'
' this macro creates a name "stop" at the current cell location and then
copies the contents to a range name "copyto". At the stop location the macro
ref to "copyto" and then joins it with "(stop)" and finishes with paste
special values. NEED to add "Carriage Return" to this macro.
'
ActiveWorkbook.Names("stop").Delete
ActiveWorkbook.Names.Add Name:="STOP", RefersToR1C1:=ActiveCell
' "=Sheet1!R5C5"
Selection.Copy
Application.Goto Reference:="copyto"
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Application.Goto Reference:="STOP"
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "=copyto&"" (STOP)"""
Range("STOP").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
End Sub