Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hello,
Could somebody please help me to modify this macro that I recorded with the macro recorder so that it won't contain any hard-coded columns anymore and instead uses whatever column is selected as the starting point? This is always going to be the last colum on the sheet, but unfortunately, the column number itself changes. _____ Selection.TextToColumns Destination:=Range("N1"), DataType:=xlDelimited, _ TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, _ Semicolon:=False, Comma:=False, Space:=False, Other:=True, OtherChar _ :="P", FieldInfo:=Array(Array(1, 1), Array(2, 1)), TrailingMinusNumbers:=True Selection.NumberFormat = "0" Columns("O:O").Select Selection.Replace What:="L", Replacement:="PL", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _ ReplaceFormat:=False Cells.Select With Selection .HorizontalAlignment = xlLeft .Orientation = 0 .AddIndent = False .IndentLevel = 0 .ShrinkToFit = False .ReadingOrder = xlContext .MergeCells = False End With |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro - Fixed text code needs replacing with variable text | Excel Discussion (Misc queries) | |||
splitting cell text using macro | Excel Discussion (Misc queries) | |||
Macro replacing links | Excel Discussion (Misc queries) | |||
replacing macro? | Excel Discussion (Misc queries) | |||
Macro help:replacing figures | Excel Discussion (Misc queries) |