Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 169
Default Chnaging Case

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




  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Chnaging Case

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

"teresa" wrote in message
...
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






  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 71
Default Chnaging Case

Hi Teresa,

I responded in your other thread:

http://groups-beta.google.com/group/...6dc0b1afa3003e

Google snafued the wrapping in my second post (big time!), hopefully you're
not using that interface!

As Nick mentioned, I made no attempt to deal with proper nouns, acronyms or
anything of the sort.

Regards,
Nate Oliver
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,758
Default Chnaging Case

You have another reply at your other post.

teresa wrote:

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




--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Chnaging Case

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

NickHK

"teresa" wrote in message
...
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








Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
change data of entire column from small case to upper case Ann Excel Worksheet Functions 1 August 16th 08 01:06 PM
Changing multiple cell text from lower case to upper case Patti Excel Discussion (Misc queries) 2 January 4th 08 08:35 PM
Chnaging Cell reference through macro ashish128 Excel Discussion (Misc queries) 7 April 25th 06 01:14 PM
Change the text from lower case to upper case in an Excel work boo dave01968 Excel Discussion (Misc queries) 2 December 9th 05 09:09 AM
How to use formula auditing to change upper case to Title Case. ScoobeyDoo Excel Worksheet Functions 1 November 19th 04 06:26 PM


All times are GMT +1. The time now is 03:57 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"