View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
ryguy7272 ryguy7272 is offline
external usenet poster
 
Posts: 2,836
Default How do i strip off Upper case Characters to another cell in Ex

It's interesting that you knew Excel could do this. How did you know Excel
could do what you wanted to do? I don't think most people know that Excel
can do this...or many other things that it can actually do quite easily...

Function Caps(r As Range) As String
Dim s As String, s2 As String, c As String
s2 = ""
s = r.Text
l = Len(s)
For i = 1 To l
c = Mid(s, i, 1)
If c = "A" And c <= "Z" Then
s2 = s2 & c
End If
Next
Caps = s2
End Function

Call the function like this:
=Caps(A1)

That goes in Cell C1.

HTH,
Ryan---
--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"joel" wrote:

=lower("Myers Power Products")

"gugertmk" wrote:

example "Myers Power Products" in cell A3 end result "MPP" in cell C6