Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro Writing
I canNOT figure out Visual Basic Language. All I want my macro to do is to
go to the end of the first line, delete the second line, cut the third line, past the third line in the cell to the right of the cell I'm editing, and then go to the cell below the cell I was editing. When I record this macro it only works in the EXACT cells I edited, not in any other cells. Oh help, please. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro Writing
As always post your macro for comments. By "line", do you mean row?
-- Don Guillett SalesAid Software "DFIChris" wrote in message ... I canNOT figure out Visual Basic Language. All I want my macro to do is to go to the end of the first line, delete the second line, cut the third line, past the third line in the cell to the right of the cell I'm editing, and then go to the cell below the cell I was editing. When I record this macro it only works in the EXACT cells I edited, not in any other cells. Oh help, please. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro Writing
Don, Thank you for responding!!!
No, by line I mean a line of text in a cell which has three lines of text, separated by "Alt Enter." I've pasted my macro below. Sorry, I should have thought of doing that from the start. See where the selection names specific text in the cell and the ranges are specific cells names? I'm working toward a generic cut and paste macro that I can use down a column of roughly 120 rows. Sub Macro5() ' ' Macro5 Macro ' Macro recorded 4/20/2005 by CC Dietrich ' ' Keyboard Shortcut: Ctrl+j ' ActiveCell.FormulaR1C1 = _ "Danai Tsapikidou ------------------ " With ActiveCell.Characters(Start:=1, Length:=77).Font .Name = "Tahoma" .FontStyle = "Regular" .Size = 10 .Strikethrough = False .Superscript = False .Subscript = False .OutlineFont = False .Shadow = False .Underline = xlUnderlineStyleNone .ColorIndex = xlAutomatic End With Range("P3").Select ActiveSheet.Paste Range("O4").Select End Sub "Don Guillett" wrote: As always post your macro for comments. By "line", do you mean row? -- Don Guillett SalesAid Software "DFIChris" wrote in message ... I canNOT figure out Visual Basic Language. All I want my macro to do is to go to the end of the first line, delete the second line, cut the third line, past the third line in the cell to the right of the cell I'm editing, and then go to the cell below the cell I was editing. When I record this macro it only works in the EXACT cells I edited, not in any other cells. Oh help, please. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro Writing
for multiple cells in a selected range
Sub findandmovetextinrange() For Each c In Selection v1 = InStr(c, Chr(10)) v2 = InStr(v1 + 1, c, Chr(10)) c.Offset(, 1) = Right(c, Len(c) - v2) c.Value = Left(c, v1 - 1) Next c End Sub -- Don Guillett SalesAid Software "DFIChris" wrote in message ... Don, Thank you for responding!!! No, by line I mean a line of text in a cell which has three lines of text, separated by "Alt Enter." I've pasted my macro below. Sorry, I should have thought of doing that from the start. See where the selection names specific text in the cell and the ranges are specific cells names? I'm working toward a generic cut and paste macro that I can use down a column of roughly 120 rows. Sub Macro5() ' ' Macro5 Macro ' Macro recorded 4/20/2005 by CC Dietrich ' ' Keyboard Shortcut: Ctrl+j ' ActiveCell.FormulaR1C1 = _ "Danai Tsapikidou ------------------ " With ActiveCell.Characters(Start:=1, Length:=77).Font .Name = "Tahoma" .FontStyle = "Regular" .Size = 10 .Strikethrough = False .Superscript = False .Subscript = False .OutlineFont = False .Shadow = False .Underline = xlUnderlineStyleNone .ColorIndex = xlAutomatic End With Range("P3").Select ActiveSheet.Paste Range("O4").Select End Sub "Don Guillett" wrote: As always post your macro for comments. By "line", do you mean row? -- Don Guillett SalesAid Software "DFIChris" wrote in message ... I canNOT figure out Visual Basic Language. All I want my macro to do is to go to the end of the first line, delete the second line, cut the third line, past the third line in the cell to the right of the cell I'm editing, and then go to the cell below the cell I was editing. When I record this macro it only works in the EXACT cells I edited, not in any other cells. Oh help, please. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
writing macro | New Users to Excel | |||
Need Help writing a macro | Excel Programming | |||
Help writing a macro | Excel Programming | |||
help in writing a macro | Excel Programming | |||
Macro Writing Help? | Excel Programming |