Change first cap to lowercase, leave everything else alone

KarenR

New Member
Joined
Sep 12, 2009
Messages
1
I use voice recognition software to dictate into Excel for a database and, ultimately, mail merge into a report. The VR software always caps the first letter. Some cells in my Excel database represent part of a sentence and the first word should not be capped.

I need a macro or code that would make the first letter of the first word in a cell to lower case and leave everything else in the cell alone. Then, I need to be able to apply it to most but not all of the 188 fields in my database.

I am a near total novice at this. I have made some macros to automate tasks but I'm lost with this. Any help appreciated.
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
To illustrate one approach, trying selecting some cells and running the following

Code:
dim rCell as range
for each rCell in selection
   rCell.value = lcase$(mid$(rCell.value, 1, 1)) & mid$(rCell.value, 2)
next rCell
 
Upvote 0
KarenR,

Welcome to the MrExcel board.

If you wanted to apply it to most but not all of the 188 fields, in this example, just to column A and C.


Before the macro:


Excel Workbook
ABC
1Field 1Field 2Field 3
2KarenRAKarenR
3Location: OhioBKarenR
4Posts: 1 CKarenR
5Change first cap to lowercaseDKarenR
6I use voice recognition software to dictate into ExcelEKarenR
7
Sheet1



After the macro:


Excel Workbook
ABC
1Field 1Field 2Field 3
2karenRAkarenR
3location: OhioBkarenR
4posts: 1 CkarenR
5change first cap to lowercaseDkarenR
6i use voice recognition software to dictate into ExcelEkarenR
7
Sheet1




Please TEST this FIRST in a COPY of your workbook (always make a backup copy before trying new code, you never know what you might lose).

Adding the Macro
1. Copy the below macro, by highlighting the macro code and pressing the keys CTRL + C
2. Open your workbook
3. Press the keys ALT + F11 to open the Visual Basic Editor
4. Press the keys ALT + I to activate the Insert menu
5. Press M to insert a Standard Module
6. Paste the code by pressing the keys CTRL + V
7. Press the keys ALT + Q to exit the Editor, and return to Excel

Code:
Option Explicit
Option Base 1
Sub FirstCharLower()
Dim c As Range, ColArray() As Variant, a As Long
ColArray = Array("A", "C")
For a = LBound(ColArray) To UBound(ColArray)
  For Each c In Range(ColArray(a) & 2, Range(ColArray(a) & Rows.Count).End(xlUp))
    c = LCase(Mid(c, 1, 1)) & Mid(c, 2)
  Next c
Next a
End Sub


Then run the "FirstCharLower" macro.
 
Upvote 0

Forum statistics

Threads
1,214,615
Messages
6,120,538
Members
448,970
Latest member
kennimack

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top