Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
Hi
Can someone write a macro for me to text column with the folloing eg in Column A, I have 4602101 - AAAAABBBBBBBCCCCCC so, I want macro to separate as put 4602101 in column A and the text in column B |
#2
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
You can do this without macros, but try this:
Sub SplitUm() Dim r1 As Range, r2 As Range Set r1 = Intersect(ActiveSheet.UsedRange, Range("A:A")) cutt = " - " For Each r2 In r1 v = r2.Value r2.Value = Split(v, cutt)(0) r2.Offset(0, 1).Value = Split(v, cutt)(1) Next End Sub -- Gary''s Student - gsnu201003 "Rohit" wrote: Hi Can someone write a macro for me to text column with the folloing eg in Column A, I have 4602101 - AAAAABBBBBBBCCCCCC so, I want macro to separate as put 4602101 in column A and the text in column B |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how we can run macro after a written text in a column | Excel Discussion (Misc queries) | |||
Macro for text to column | Excel Discussion (Misc queries) | |||
Text to column macro | Excel Discussion (Misc queries) | |||
Macro to find text string in a column and paste data in another | Excel Discussion (Misc queries) | |||
text to column macro | Excel Worksheet Functions |