Proper function fix sought

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I am using a macro with the proper function, but unfortunately, I have some
cells where the content is like this: “Word-Wordâ€. The proper function as is
turns that into “Word-wordâ€. How could it be made to leave that intact?

Thank you.
 
Depending on what your list of words looks like, maybe:

=SUBSTITUTE(PROPER(SUBSTITUTE(A1,"-"," "))," ","-")

This assumes that there are no spaces in the original list. If there are
spaces, then those spaces will get turned into hyphens.
 
Thank you for your replies.
However, I'm not sure I can use that. Below is my macro code. I'm not very
VB literate so I don't know how to implement your ideas.

For Each Cell In Intersect(Selection, _
Selection.SpecialCells(xlConstants, xlTextValues))
Cell.Formula = StrConv(Cell.Formula, vbProperCase)

Next
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top