Thread: TRIM function
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default TRIM function

Instead of
MsgBox ms

use
ac.offset(,1)=ms
or
range("a2")=ms

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"JockW" wrote in message
...
Thanks Don, works fine but I would like the resilts in a seperate cell. I
didn't state that so my fault.
--
tia


"Don Guillett" wrote:

One way
Sub getcaplettersfromstring()
ac = ActiveCell
For i = 1 To Len(ac)
If Mid(ac, i, 1) = UCase(Mid(ac, i, 1)) Then
'MsgBox Mid(Ac, i, 1)
ms = ms & Mid(ac, i, 1)
End If
Next i
MsgBox ms
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

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