Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Format Case for only
Hi,
I have names in one column, I need formula to convert the names in to proper case. but if there is any 3 character word it should be in Upper case. Plz Help... eg. AAA SYSTEM change into AAA system DELL COMPUTERS change into DELL Computers MOBILE BPL change into Mobile BPL SIMMONS LAD change into Simmons LAD A V SYS MEDIA PVT LTD change into A V SYS Media PVT LTD It should change the case to upper for 3 letter words and rest to Proper case |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Format Case for only
Select a cell and then run this macro:
Sub Deepak() Dim r As Range Dim s As String, sOut As String Set r = Selection r.Value = WorksheetFunction.Proper(r.Value) s = r.Value ss = Split(s, " ") For i = LBound(ss) To UBound(ss) If Len(ss(i)) = 3 Then ss(i) = UCase(ss(i)) End If Next sOut = ss(0) For i = LBound(ss) + 1 To UBound(ss) sOut = sOut & " " & ss(i) Next r.Value = sOut End Sub -- Gary''s Student "Deepak" wrote: Hi, I have names in one column, I need formula to convert the names in to proper case. but if there is any 3 character word it should be in Upper case. Plz Help... eg. AAA SYSTEM change into AAA system DELL COMPUTERS change into DELL Computers MOBILE BPL change into Mobile BPL SIMMONS LAD change into Simmons LAD A V SYS MEDIA PVT LTD change into A V SYS Media PVT LTD It should change the case to upper for 3 letter words and rest to Proper case |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Displays the number in text. (One thousand two hundred thirty four | Excel Worksheet Functions | |||
how to use spellnumber formula | Excel Worksheet Functions | |||
Currency to Text | Excel Worksheet Functions | |||
VBA Code | Excel Discussion (Misc queries) | |||
EXCEL:NUMBER TO GREEK WORDS | Excel Worksheet Functions |