View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default How do i strip off Upper case Characters to another cell in Ex

Interesting...I never knew that Mid was more than just a function.
--
Gary''s Student - gsnu2007xx


"Rick Rothstein" wrote:

Just to be different, here is another way that UDF could be written...

Function GetUpperLetters(ByVal strRange As String) As String
Dim X As Long
For X = 1 To Len(strRange)
If Mid(strRange, X, 1) Like "[!A-Z]" Then Mid(strRange, X, 1) = " "
Next
GetUpperLetters= Replace(strRange, " ", "")
End Function

--
Rick (MVP - Excel)


"Jacob Skaria" wrote in message
...
If you are looking for a User defined function ...Set the Security level
to
low/medium in (Tools|Macro|Security). 'Launch VBE using short-key Alt+F11.
Insert a module and paste the below function. Save. Get back to Workbook.

Use the formula
=GetUpperLetters(A1)

Function GetUpperLetters(strRange)
For intTemp = 1 To Len(strRange)
If Asc(Mid(strRange, intTemp, 1)) 64 And Asc(Mid(strRange, intTemp, 1))
<
91 Then
GetUpperLetters = GetUpperLetters & Mid(strRange, intTemp, 1)
End If
Next
End Function


If this post helps click Yes
---------------
Jacob Skaria


"gugertmk" wrote:

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