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



"ryguy7272" wrote:

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


Thank You that worked like a charm, but had to change "Caps" to "Capsall" as
an error said "Caps" was to ambiguous.
Thanks again