Home |
Search |
Today's Posts |
#7
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I can't get this to work! Probably me. Where do I put it?
-- tia "Sheeloo" wrote: Try this UDF (sorry, may not fit on a postcard :-) 'USAGE enter into any cell as =extractCAPS(A1) if your string is in A1 Function extractCAPS(iStr As String) As String extractCAPS = "" Dim c As String Dim iWord As String iWord = "" Dim i As Integer If Len(iStr) = 0 Then extractCAPS = "" Exit Function End If For i = 1 To Len(iStr) c = Mid(iStr, i, 1) If c < " " Then iWord = iWord & c Else If (iWord = StrConv(iWord, vbUpperCase)) Then extractCAPS = extractCAPS & iWord End If iWord = " " End If Next i If (iWord = StrConv(iWord, vbUpperCase)) Then extractCAPS = extractCAPS & iWord End If End Function -- If you find this post helpful pl. choose "Yes"... "JockW" wrote: Hi Is it possible to use a function to extract only words in capital letters in a cell? So, for instance from "IS IT POSSIBLE to use a function" would return IS IT POSSIBLE and ignore the rest. Answers on a postcard please.... -- tia |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
TRIM FUNCTION...how to? | Excel Worksheet Functions | |||
Trim Function | Excel Discussion (Misc queries) | |||
TRIM function | New Users to Excel | |||
Trim Function | Excel Worksheet Functions | |||
Need help with TRIM function | Excel Worksheet Functions |