Hi, I need help from you guys.
Input String: abhijit abhijit
O/p String: aBhIjIt AbHiJiT
I need a script to get alternate character Capital.
Thanks for Reply. But this code is not handling space. It should not consider space and should make next character Capital/Small
Input: a a a a
O/p: a A a A
here is the updated code.
Code:
input = "abhijit abhijit"
charCounter = 1
For i = 1 To len(input) Step 1
char = Mid(input,i,1)
If char <> " " Then
If charCounter mod 2 = 0 Then
outPut = output & Ucase(char)
Else
outPut = output & lcase(char)
End If
charCounter = charCounter + 1
else
output = output & char
End If
Next
msgbox output
Note:- I have done it based on the pure requirement in this query. Ideally we have to check if the value is an alphabet and then change the case.