I have created a macro that copies a concatenated series of cells then runs 'text to columns' on it.
I want to repeat this process using the same cell to copy from (the text will change) but copy into a different cell i.e. the first time I run it I want it to start in E2 but the next time may be in E5 and then E3 etc.
I am pretty new to this and have no clue about the code. What I have is below. I'm guessing it's the 'Offset cell' that I need to be dynamic but I don't know how to do this.
Also, if anyone knows how to run text to columns without it bringing up the warning it would be great to remove that.
Please help!
Thanks
Sub text2columns()
'
' text2columns Macro
'
' Keyboard Shortcut: Ctrl+m
'
ActiveWindow.ScrollColumn = 2
ActiveWindow.ScrollColumn = 3
Range("M24").Select
Selection.Copy
ActiveWindow.ScrollColumn = 2
ActiveWindow.ScrollColumn = 1
ActiveCell.Offset(-22, -8).Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Selection.TextToColumns Destination:=ActiveCell, DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=False, _
Semicolon:=False, Comma:=False, Space:=False, Other:=True, OtherChar _
:=".", FieldInfo:=Array(Array(1, 1), Array(2, 1), Array(3, 1), Array(4, 1)), _
TrailingMinusNumbers:=True
End Sub
I want to repeat this process using the same cell to copy from (the text will change) but copy into a different cell i.e. the first time I run it I want it to start in E2 but the next time may be in E5 and then E3 etc.
I am pretty new to this and have no clue about the code. What I have is below. I'm guessing it's the 'Offset cell' that I need to be dynamic but I don't know how to do this.
Also, if anyone knows how to run text to columns without it bringing up the warning it would be great to remove that.
Please help!
Thanks
Sub text2columns()
'
' text2columns Macro
'
' Keyboard Shortcut: Ctrl+m
'
ActiveWindow.ScrollColumn = 2
ActiveWindow.ScrollColumn = 3
Range("M24").Select
Selection.Copy
ActiveWindow.ScrollColumn = 2
ActiveWindow.ScrollColumn = 1
ActiveCell.Offset(-22, -8).Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Selection.TextToColumns Destination:=ActiveCell, DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=False, _
Semicolon:=False, Comma:=False, Space:=False, Other:=True, OtherChar _
:=".", FieldInfo:=Array(Array(1, 1), Array(2, 1), Array(3, 1), Array(4, 1)), _
TrailingMinusNumbers:=True
End Sub