Thursday, January 12, 2012

User defined function in excel to Change case char by char


!................Use:- Change Case Char by Char............!

Function CHANGE_CASE(x) As Variant

Dim y As Variant
y = ""
For i = 1 To Len(x)
If Asc(Mid(x, i, 1)) > 64 And Asc(Mid(x, i, 1)) < 91 Then
y = y & LCase(Mid(x, i, 1))
Else
y = y & UCase(Mid(x, i, 1))
End If
Next
CHANGE_CASE = y

End Function


_______________________________________________
Example:-
=CHANGE_CASE ("AbcDeFgHiJkLmNoPqRsTuVwXyZ")

Result----------------------------------->aBCdEfGhIjKlMnOpQrStUvWxYz

1 comment:

  1. Woori Casino No Deposit Bonus 2021 | Free Play in Demo
    Woori Casino offers a 출장마사지 variety of free spins and no kadangpintar deposit bonuses, febcasino.com as well https://octcasino.com/ as regular promotions. As you can't claim 1등 사이트 this offer without being registered

    ReplyDelete

Excel VBA to send email from excel with HTML table in a email body

'' Excel vba script to send email from outlook & email body in HTML table format. ''Write down email body in HTML tags...