ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Proper function fix sought (https://www.excelbanter.com/excel-discussion-misc-queries/157245-proper-function-fix-sought.html)

Niniel

Proper function fix sought
 
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.


Dave Peterson

Proper function fix sought
 
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.



Niniel wrote:

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.


--

Dave Peterson

Peo Sjoblom

Proper function fix sought
 
Or don't use a space

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


--
Regards,

Peo Sjoblom



"Dave Peterson" wrote in message
...
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.



Niniel wrote:

Hello,

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

Thank you.


--

Dave Peterson




Niniel

Proper function fix sought
 
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




All times are GMT +1. The time now is 08:53 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com