View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Duncan[_7_] Duncan[_7_] is offline
external usenet poster
 
Posts: 18
Default Removing vowels from words...

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?