How to capitalize everything before a certain character?

Burrgogi

Active Member
Joined
Nov 3, 2005
Messages
340
Office Version
  1. 2010
Platform
  1. Windows
In column A, I have some text:
Hello good day.mp3
Hello good day.flac
etc.

I'd like to capitalize everything before the period. I don't need the file extension capitalized.

I have a feeling that I need to combine the PROPER function with the FIND function but I'm struggling to find the right formula. I'm lost. :(
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Can you clarify something for me (us)? When you say "capitalize everything before the period", do you mean all letters or just the first letter of each word? I ask because you mentioned the PROPER function which does the latter.
 
Upvote 0
Don't have Excel but try
Rich (BB code):
=UPPER(LEFT(A1,FIND(".",A1,1)))&MID(A1,FIND(".",A1)+1,10)
 
Upvote 0
Can you clarify something for me (us)? When you say "capitalize everything before the period", do you mean all letters or just the first letter of each word? I ask because you mentioned the PROPER function which does the latter.

I must admit I worded that rather poorly. I should have said capitalize each word It's been a very long day for me, full of yard work. :(

The end result I'm trying to achieve is this:

Hello Good Day.mp3
Hello Good Day.flac
 
Upvote 0
Ok, change to
Rich (BB code):
=Proper(LEFT(A1,FIND(".",A1,1)))&MID(A1,FIND(".",A1)+1,10)
 
Upvote 0
Another question (your answer might affect the function of the formulas you have received)... is it possible for there to be period (say, on an abbreviation perhaps) appearing before the period in front of the file extension?
 
Upvote 0
Another question (your answer might affect the function of the formulas you have received)... is it possible for there to be period (say, on an abbreviation perhaps) appearing before the period in front of the file extension?

Hi Rick, there are no other periods that appear in the filename. I have double checked.

Since trying out Toadstool's formula, I have discovered 2 unexpected problems:

#1.
I have apostrophies appearing in some of the filenames. For example, using his formula makes turns this filename:
He's Funny That Way.mp3

Into this:
He'S Funny That Way.mp3


#2. The PROPER function is kind of mucking up the works a bit. It's converting second letter (actually all letters after the 1st one) in these particular scenarios lowercase which is definitely not what I want.
III Some Filename.mp3
XI Kyrie Eleison.mp3

Becomes this:
Iii Some Filename.mp3
Xi Kyrie Eleison.mp3

Any thoughts?
 
Upvote 0

Forum statistics

Threads
1,214,588
Messages
6,120,409
Members
448,959
Latest member
camelliaCase

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