Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I've been trying to program a macro to search for all text after a colon (:)
and move that text to an adjacent empty cell. I've been able to get it to search, but from that point on it will only paste what is already on the clipboard instead of copying new text. What am I missing? Or is it evenpossible? -- Bring them home now |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Sure, As always, post YOUR code for comments. You should also provide
details of what you are trying to do. -- Don Guillett SalesAid Software "icetoad hisself" wrote in message ... I've been trying to program a macro to search for all text after a colon (:) and move that text to an adjacent empty cell. I've been able to get it to search, but from that point on it will only paste what is already on the clipboard instead of copying new text. What am I missing? Or is it evenpossible? -- Bring them home now |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() Sub Macro1() Application.DisplayAlerts = False Selection.TextToColumns Destination:=ActiveCell, DataType:=xlDelimited, _ TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, _ Semicolon:=True, Comma:=False, Space:=False, Other:=True, OtherChar:= _ ":", FieldInfo:=Array(Array(1, 1), Array(2, 1)) End Sub When using macro recorder un text to columns, especially if you are using : as a delimiter |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi.
You can do it without a macro. If your text (containing a colon) is in A2, put =RIGHT(A2,LEN(A2)-FIND(":",A2)) in B2 to get the text after the colon. If there are cells without a colon, you get a #value error, so if necessary wrap it in an if statement like this =IF(ISERROR(FIND(":",A2)),"",RIGHT(A2,LEN(A2)-FIND(":",A2))) That will return a blank if there is no colon in A2. Len icetoad hisself wrote: I've been trying to program a macro to search for all text after a colon (:) and move that text to an adjacent empty cell. I've been able to get it to search, but from that point on it will only paste what is already on the clipboard instead of copying new text. What am I missing? Or is it evenpossible? |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
You could add a new column to the right of your column, choose the column you
want to separate, and choose Data/Text to Columns and choose "Other" as a delimiter and insert a colon there. Done! "icetoad hisself" wrote: I've been trying to program a macro to search for all text after a colon (:) and move that text to an adjacent empty cell. I've been able to get it to search, but from that point on it will only paste what is already on the clipboard instead of copying new text. What am I missing? Or is it evenpossible? -- Bring them home now |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Recorded macro has hard cell contents. | Excel Discussion (Misc queries) | |||
Using macro to copy a part of a cell content to next cell | Excel Discussion (Misc queries) | |||
Compiling macro based on cell values | Excel Discussion (Misc queries) | |||
move cell contents | Excel Discussion (Misc queries) | |||
Possible Lookup Table | Excel Worksheet Functions |