![]() |
#7
|
|||
|
|||
![]()
Sure thing!
Here's the code: Sub explodelist() ' ' explodelist Macro ' ' Selection.Find.ClearFormatting Selection.Find.Replacement.ClearFormatting With Selection.Find .Text = ", " .Replacement.Text = "^n" .Forward = True .Wrap = wdFindContinue .Format = False .MatchCase = False .MatchWholeWord = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False End With Selection.Find.Execute Replace:=wdReplaceAll Selection.WholeStory Selection.Cut End Sub What this does is, I take a list of ingredients seperated by commas and paste it into word. When I run the macro, the program does [find and replace to replace each instance of a comma followed by a space (, ) with a page break (^n). Then it selects all and cuts it onto the clipboard] so I can paste it into excel, where it appears in seperate cells within a column rather than the whole list in paragraph form, which is how it started. The brackets surround my description of exactly what the macro does. My main goal for this is to be able to acomplish the same thing without having to be clicking back and forth between windows all the time. |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
jmaxcy | Excel | 14 | 11-01-2013 04:07 PM |
Inserting text from one word file into another based on an excel input | jmaxcy | Word | 3 | 11-01-2013 01:26 AM |
AZWizard Module - ?hidden module | pcaldwell | Word | 1 | 08-22-2012 01:19 PM |
![]() |
educpara58 | Excel | 2 | 07-28-2011 01:22 AM |
bad module "Italian Grammar" crashes Word | townsend0406 | Word | 0 | 04-20-2009 11:04 PM |