Chnaging Case

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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
 
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
 
teresa,
As another thought, you could see how much mileage you can get from Excel's
grammar/spell checker.

NickHK
 
Back
Top