Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-09-2014, 10:49 AM
nymusicman nymusicman is offline Change characters outside a wildcard while keeping wildcard results Windows 8 Change characters outside a wildcard while keeping wildcard results Office 2007
Novice
Change characters outside a wildcard while keeping wildcard results
 
Join Date: Apr 2014
Posts: 2
nymusicman is on a distinguished road
Default Change characters outside a wildcard while keeping wildcard results

What I want to do:

Find a comma in front of a number ",1" and change it to a period ".1"

How I'm currently doing it

Code:
With Selection.Find
.Text = ",1"
.Replacement.Text = ".1"
...
and repeat for all numbers 0-9.

I'd like to condense this maybe using something like
Code:
.Text = ",[0-9]"
But I'm not sure how to go about it.



Please help!
Reply With Quote
  #2  
Old 04-09-2014, 03:53 PM
macropod's Avatar
macropod macropod is offline Change characters outside a wildcard while keeping wildcard results Windows 7 32bit Change characters outside a wildcard while keeping wildcard results Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
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

Try:

.Text = ,([0-9])
.Replacement.Text = .\1
.MatchWildcards = True
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 04-10-2014, 08:17 AM
nymusicman nymusicman is offline Change characters outside a wildcard while keeping wildcard results Windows 8 Change characters outside a wildcard while keeping wildcard results Office 2007
Novice
Change characters outside a wildcard while keeping wildcard results
 
Join Date: Apr 2014
Posts: 2
nymusicman is on a distinguished road
Default

Thank you, that worked. I was just missing paranthesis and the wildcard true statement.

Facepalm moment!
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Change characters outside a wildcard while keeping wildcard results Tricky wildcard search NobodysPerfect Word 10 03-19-2014 04:29 AM
Change characters outside a wildcard while keeping wildcard results Wildcard for selective deleting binar Word 1 01-10-2013 04:37 AM
Wildcard Problem with Emailadresses Fmax Word 1 06-17-2010 06:09 AM
Wildcard search help. Kempston Word 0 11-13-2009 03:58 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 05:42 PM.


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