Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 02-09-2012, 09:12 PM
macropod's Avatar
macropod macropod is offline String conversion formula? Windows 7 64bit String conversion formula? Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi JGT,

I'd be inclined to do this in Word, using a Find/Replace macro like:
Code:
Sub ParseMeals()
Application.ScreenUpdating = False
With ActiveDocument
  .Range.InsertBefore vbCr
  With .Content.Find
    .ClearFormatting
    .Replacement.ClearFormatting
    .Forward = True
    .Wrap = wdFindContinue
    .Format = False
    .MatchWildcards = True
    .Text = "^t"
    .Replacement.Text = "^p"
    .Execute Replace:=wdReplaceAll
    .Text = "^13{1,}"
    .Replacement.Text = ", ^p"
    .Execute Replace:=wdReplaceAll
    .Text = "([!^13)]{1,}\))*\[([0-9]{1,})*\(([0-9]{1,})(*\), )"
    .Replacement.Text = "^^\2|\3|\1"
    .Execute Replace:=wdReplaceAll
    .Text = "^13^94"
    .Replacement.Text = "^p"
    .Execute Replace:=wdReplaceAll
  End With
  .Paragraphs.First.Range.Delete
  .Characters.Last.Delete
End With
Application.ScreenUpdating = True
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 

Tags
export, formula, string



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to extract only numbers from a STRING? Learner7 Excel 3 07-02-2013 06:25 AM
Export string from e-mail body to .csv aphrodita Outlook 0 01-05-2012 08:53 AM
String conversion formula? Call Macro from Input Box String Paulsh Word VBA 1 11-01-2011 03:15 AM
Extract numbers from a text string aleale97 Excel 4 02-10-2011 10:33 AM
Extract from String using Wildcard whousedmy Word 0 05-21-2009 01:35 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:05 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft