View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default Removing vowels from words...

If he didn't go backwards, that code would reverse the text, so you would
get __rcm ,llx ,lgg__ instead of __ggl, xcll, mcr__

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Duncan" wrote in message
...
On 19 Dec, 07:43, carlo wrote:
Maybe this function can help you:

'------------------------------------------------------
Function removeVowel(VowelWord As String) As String

Dim NoVowelWord As String

For L = Len(VowelWord) To 1 Step -1
If Mid(VowelWord, L, 1) = "a" Or _
Mid(VowelWord, L, 1) = "e" Or _
Mid(VowelWord, L, 1) = "i" Or _
Mid(VowelWord, L, 1) = "o" Or _
Mid(VowelWord, L, 1) = "u" Then
Else
NoVowelWord = Mid(VowelWord, L, 1) & NoVowelWord
End If
Next L

removeVowel = NoVowelWord

End Function
'------------------------------------------------------

It returns the word without vowels

Cheers Carlo

On Dec 19, 4:35 pm, wrote:

How to remove vowels from words? Fpr example, in one row we have
google, excell, macro,... and the result in another row is ggl, xcll,
mcr,... Thanks.



Why is the loop stepping backwards?