We help IT Professionals succeed at work.

Excel 2010 - Why doesn't VBA Replace function work to remove parentheses?

246 Views
Last Modified: 2017-05-21
Hi Experts,

I've got a fairly simple recorded macro that attempts to clean up a phone number list by removing "(", ")", "-" and spaces but while it is removing the "-" and spaces, it is not removing the parentheses.  I can't understand why.

The macro "CleanPhoneNumbers" runs against Column C on the first sheet.  The attached file is in the condition that exists before the macro is run.

I appreciate any help.

Jeff
optins_iWin_18MAY2017-EE.xlsm
Comment
Watch Question

Analyst Assistant
CERTIFIED EXPERT
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
gowflowPartner
CERTIFIED EXPERT
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
First of all, thank you both for posting on my topic.  And thanks to both of you for both posting viable solutions.  So, in this circumstance, should I award all/most points to the 1st correct solution, or split them equally between both correct solutions?  

I don't want to disrespect or be unappreciative to either of you since both solutions are working ... (and I'm probably most sensitive to you here gowflow, as I just (on another topic) awarded more points to an earlier solution than yours (although yours worked there, too).  Just want to know what the usual protocol in this situation might be ...

Jeff
NorieAnalyst Assistant
CERTIFIED EXPERT

Commented:
Jeff

To be honest I'm not bothered.:)

Author

Commented:
Ok, thanks. Norie.  I'll split the points equally then.

Jeff

Author

Commented:
Thanks again!!
gowflowPartner
CERTIFIED EXPERT

Commented:
Sorry I was off the movies and frankly to answer also I'm not bothered I repeat again it is always the asker's own choice to close the question as he/she honestly feel and I have to admit I respect your care to satisfy all who have helped you taking much care not to have someone not happy which for me indicate a true honest person reflect your personality.

I have to admit we see all kind of askers here in EE and to be honest if we have to be affected each time by why this or why that then we would be wasting time and efforts.

We surely appreciate your way of dealing and you can be sure that this is the best way for you to gain 'freinds' to help you along the line.

Regards
gowflow

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.