Chnaging Case

G

Guest

Hi,

In cells c1 to h200 I have long sentences in each cell,
all the letters are in capitals. I need to write a macro
which loops through each cell and changes the letters to small
except:
1)The first letter
2) Any letter after a full stop
3) i

e.g. THE DAY WAS SUNNY AND I WORE A HAT.PETER WAS THERE

Becomes

The day was sunny and I wore a hat.Peter was there

Thanks A Million for any help
 
N

NickHK

teresa,
In VBA, check out:
LCase -change the whole sentence to lower case
Split -break up you sentence on the "."
Replace -change i to I
UCase(Left -change the first letter of each sentence to Upper case.
And make your own function.

If you intend to handle proper nouns (Peter) correctly, you've got a lot
more work.

NickHK
 
D

Dave Peterson

You have another reply at your other post.
Hi,

In cells c1 to h200 I have long sentences in each cell,
all the letters are in capitals. I need to write a macro
which loops through each cell and changes the letters to small
except:
1)The first letter
2) Any letter after a full stop
3) i

e.g. THE DAY WAS SUNNY AND I WORE A HAT.PETER WAS THERE

Becomes

The day was sunny and I wore a hat.Peter was there

Thanks A Million for any help
 
N

NickHK

teresa,
As another thought, you could see how much mileage you can get from Excel's
grammar/spell checker.

NickHK
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top