Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Convert uppercase to lowercase
Does anyone have a bit of code to convert a file of conatcts all in
UPPERCASE to Lower Case? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Convert uppercase to lowercase
Mervyn Thomas;593677 Wrote: Does anyone have a bit of code to convert a file of conatcts all in UPPERCASE to Lower Case? Code: -------------------- For each cll in selection.cells cll.value = lcase(cll.value)' either this line or the next 'cll.Value = Application.WorksheetFunction.Proper(cll.Value) next cll -------------------- -- p45cal *p45cal* ------------------------------------------------------------------------ p45cal's Profile: 558 View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=164484 Microsoft Office Help |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Convert uppercase to lowercase
Sub dk()
Dim nm As Range For Each nm In Range("A2:A25") 'substitute actual range nm = StrConv(nm.Value, vbProperCase) Next End Sub "Mervyn Thomas" wrote in message ... Does anyone have a bit of code to convert a file of conatcts all in UPPERCASE to Lower Case? |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Convert uppercase to lowercase
Use the LCase Function.
LCase("Your String Here") Hope this helps! IF so, let me know, click "YES" below. -- Cheers, Ryan "Mervyn Thomas" wrote: Does anyone have a bit of code to convert a file of conatcts all in UPPERCASE to Lower Case? . |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Convert uppercase to lowercase
"Lower Case" looks like Proper Case to me.
You choose................. Sub Lower() Dim Cell As Range Application.ScreenUpdating = False For Each Cell In Selection Cell.Formula = LCase(Cell.Formula) Next Application.ScreenUpdating = True End Sub Sub Proper() Dim Cell As Range Application.ScreenUpdating = False For Each Cell In Selection Cell.Formula = Application.Proper(Cell.Formula) Next Application.ScreenUpdating = True End Sub Gord Dibben MS Excel MVP On Tue, 22 Dec 2009 16:24:00 -0000, "Mervyn Thomas" wrote: Does anyone have a bit of code to convert a file of conatcts all in UPPERCASE to Lower Case? |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Convert uppercase to lowercase
Sub lowerCase()
Dim r As Long r = 1 Do While Len(Range("A" & r).Formula) 0 ' repeat until first empty cell in column A With Range("A" & r) .Value = LCase(.Value) End With r = r + 1 ' next row Loop End Sub "Mervyn Thomas" wrote: Does anyone have a bit of code to convert a file of conatcts all in UPPERCASE to Lower Case? . |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Convert uppercase to lowercase
I'm not sure where your range of data you want to change to Lower Case so I
assume it is in Sheet1 in Col. A. Here is some code you can run which will change all data in Column to lower case. Hope this helps! If so, let me know, click "YES" below. Sub ConvertToLowerCase() Dim rng As Range With Sheets("Sheet1") For Each rng In .Range("A1:A" & .Cells(Rows.Count, "A").End(xlUp).Row) rng.Value = LCase(rng.Value) Next rng End With End Sub -- Cheers, Ryan "Ryan H" wrote: Use the LCase Function. LCase("Your String Here") Hope this helps! IF so, let me know, click "YES" below. -- Cheers, Ryan "Mervyn Thomas" wrote: Does anyone have a bit of code to convert a file of conatcts all in UPPERCASE to Lower Case? . |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
Convert uppercase to lowercase
I particularly liked this solution but thanks to everyone who answered
"JLGWhiz" wrote in message ... Sub dk() Dim nm As Range For Each nm In Range("A2:A25") 'substitute actual range nm = StrConv(nm.Value, vbProperCase) Next End Sub "Mervyn Thomas" wrote in message ... Does anyone have a bit of code to convert a file of conatcts all in UPPERCASE to Lower Case? |
#9
Posted to microsoft.public.excel.programming
|
|||
|
|||
Convert uppercase to lowercase
PS with all these methods how do you find in the VB help the various
options in your StrConv(nm.Value, vbProperCase) ? Or is their a decent manual somwehere? I would much prefer being able to find it myself rather than bother you guys! Thanks again! Mervyn "Mervyn Thomas" wrote in message ... I particularly liked this solution but thanks to everyone who answered "JLGWhiz" wrote in message ... Sub dk() Dim nm As Range For Each nm In Range("A2:A25") 'substitute actual range nm = Next End Sub "Mervyn Thomas" wrote in message ... Does anyone have a bit of code to convert a file of conatcts all in UPPERCASE to Lower Case? |
#10
Posted to microsoft.public.excel.programming
|
|||
|
|||
Convert uppercase to lowercase
In the VBE, you can put your cursor in the word/method you are interested in
learning about and press F1, this will take you directly to the help section it is in. I just read some books, check this forum out a lot and you come across a lot of functions that other people use, then learn about it. It takes time but you can catch on quickly. -- Cheers, Ryan "Mervyn Thomas" wrote: PS with all these methods how do you find in the VB help the various options in your StrConv(nm.Value, vbProperCase) ? Or is their a decent manual somwehere? I would much prefer being able to find it myself rather than bother you guys! Thanks again! Mervyn "Mervyn Thomas" wrote in message ... I particularly liked this solution but thanks to everyone who answered "JLGWhiz" wrote in message ... Sub dk() Dim nm As Range For Each nm In Range("A2:A25") 'substitute actual range nm = Next End Sub "Mervyn Thomas" wrote in message ... Does anyone have a bit of code to convert a file of conatcts all in UPPERCASE to Lower Case? . |
#11
Posted to microsoft.public.excel.programming
|
|||
|
|||
Convert uppercase to lowercase
Some of them are difficult to find if you start from scratch. You can find
the options for StrConv by opening VBE Alt + F11 and typing that term in the VBA help search box. Then select it from the topic listing when it shows. Or you can do it like Ryan suggests and select it with the mouse, then press F1 key. I spent many hours searching the help files when I first began to write code. I was not aware that the news group existed back then, but it was a good learning process, because I found many things that I later used, plus it gave me a broader view of what VBA could do. I am still learning and find that I have only scratched the surface of VBA capabilities, although I have written some pretty complex code before. The main thing is to have a good understanding of the conventions used by the designers of VBA. If you can get into their heads a little bit, it will help you to find methods and tools in the VBA help files. "Mervyn Thomas" wrote in message ... PS with all these methods how do you find in the VB help the various options in your StrConv(nm.Value, vbProperCase) ? Or is their a decent manual somwehere? I would much prefer being able to find it myself rather than bother you guys! Thanks again! Mervyn "Mervyn Thomas" wrote in message ... I particularly liked this solution but thanks to everyone who answered "JLGWhiz" wrote in message ... Sub dk() Dim nm As Range For Each nm In Range("A2:A25") 'substitute actual range nm = Next End Sub "Mervyn Thomas" wrote in message ... Does anyone have a bit of code to convert a file of conatcts all in UPPERCASE to Lower Case? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
uppercase to lowercase | Excel Discussion (Misc queries) | |||
Lowercase to uppercase | Excel Discussion (Misc queries) | |||
uppercase to lowercase | Excel Programming | |||
lowercase to uppercase | Excel Programming | |||
lowercase to uppercase | Excel Worksheet Functions |