MrExcel Message Board

Go Back   MrExcel Message Board > Question Forums > Excel Questions

Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only.

Reply
 
Thread Tools Display Modes
Old Mar 15th, 2002, 09:27 PM   #1
Hellhole
New Member
 
Join Date: Mar 2002
Posts: 3
Default

Im sure the answer to this is staring me in the face but how do I get lowercase letters typed into a form to turn into capitals. ie if I input n, it should change to N. There is only one letter per cell. Thanks for any help. PS have had a look at the UPPER command but could not get it to work for me!!

HELP PLEASE
Hellhole is offline   Reply With Quote
Old Mar 15th, 2002, 09:59 PM   #2
Tom Urtis
MrExcel MVP
 
Tom Urtis's Avatar
 
Join Date: Feb 2002
Location: San Francisco, California USA
Posts: 10,387
Default

The formula for that would be (as an example, in B1)
=UPPER(A1)
where A1 holds the one letter value that is currently showing in lower case.

Did you need something more than that?
__________________
Tom Urtis
Microsoft MVP - Excel
Tom Urtis is offline   Reply With Quote
Old Mar 15th, 2002, 10:00 PM   #3
Mark O'Brien
MrExcel MVP
 
Mark O'Brien's Avatar
 
Join Date: Feb 2002
Location: Columbus, OH, USA
Posts: 3,519
Default

OK, you're going to have to use VBA for this. (I could be wrong, but this is the way I would do it)

for this example I'm using cells A1 and B1 on as the cells that contain the text.

Right click on the tab of the sheet that you will have the text on, and choose "View Code".

Copy and paste this code into the editor:


Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub
If Target = [A1] _
Or Target = [B1] Then
Target.Value = UCase(Target.Value)
End If
End Sub


You can change this code by changing A1 and B1 to be whatever cells you want to capitalise.

I hope this makes sense.
__________________
Mark O'Brien

Columbus Ohio Celtic Supporters Club
Mark O'Brien is offline   Reply With Quote
Old Mar 15th, 2002, 10:10 PM   #4
Hellhole
New Member
 
Join Date: Mar 2002
Posts: 3
Default

If the lowercase letter is entered in say A1, the uppercase letter also has to be in A1. The function you quoted takes the lowercase from one cell and puts the Capital in another cell.
I thought there might be a cell format option that I couldn't find that would be possible to use. There is something similar in Word that can be used when working with tables.

Any other idea's?
Hellhole is offline   Reply With Quote
Old Mar 15th, 2002, 10:55 PM   #5
Ivan F Moala
MrExcel MVP
 
Ivan F Moala's Avatar
 
Join Date: Feb 2002
Location: Auckland, New Zealand
Posts: 4,209
Default

Quote:
On 2002-03-15 21:10, Hellhole wrote:
If the lowercase letter is entered in say A1, the uppercase letter also has to be in A1. The function you quoted takes the lowercase from one cell and puts the Capital in another cell.
I thought there might be a cell format option that I couldn't find that would be possible to use. There is something similar in Word that can be used when working with tables.

Any other idea's?
Hi hellhole
The procedure Mark gave you is A
Event procedure. It LOOKS @ A1 & B1....so that if you type in any letter it converts it to Uppercase.
If you use this then you will have to change
the range you need to monitor to get uppercases into the cells.


Post if still not clear

Ivan
Ivan F Moala is offline   Reply With Quote
Old Mar 15th, 2002, 11:18 PM   #6
Anne Troy
MrExcel MVP
 
Anne Troy's Avatar
 
Join Date: Feb 2002
Location: Allentown, PA
Posts: 2,510
Default

Just another, similar one...

Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
If Not Application.Intersect(Target, Range("A1:A10")) Is Nothing Then
Target(1).Value = UCase(Target(1).Value)
End If
Application.EnableEvents = True
End Sub

To get all entries in column A through G to turn uppercase regardless of entry, change the range to "A:G"
__________________
~Anne Troy
Anne Troy is offline   Reply With Quote
Old Mar 18th, 2002, 12:39 AM   #7
Hellhole
New Member
 
Join Date: Mar 2002
Posts: 3
Default

Quote:
On 2002-03-15 22:18, Dreamboat wrote:
Just another, similar one...

Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
If Not Application.Intersect(Target, Range("A1:A10")) Is Nothing Then
Target(1).Value = UCase(Target(1).Value)
End If
Application.EnableEvents = True
End Sub

To get all entries in column A through G to turn uppercase regardless of entry, change the range to "A:G"
Great stuff. Thanks for your help everyone.
Not as somple as I thought it would be (ie a format option) but this works just great. So thanks once again.

Hellhole - London UK
Hellhole is offline   Reply With Quote
Old Mar 18th, 2002, 01:11 AM   #8
Anne Troy
MrExcel MVP
 
Anne Troy's Avatar
 
Join Date: Feb 2002
Location: Allentown, PA
Posts: 2,510
Default

Well, okay, I admit. I actually stole it from:

http://www.cpearson.com/excel/case.htm

I like to give credit where credit is due.
__________________
~Anne Troy
Anne Troy is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 05:49 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
All contents Copyright 1998-2012 by MrExcel Consulting.
diabetic desserts recipes recipes Diabetic Soups Holiday Pizza Recipes Popcorn Recipes Recipes For Microwave Pasta Recipes Casserole Recipes Chili Recipes Curry Recipes Crockpot Recipes Apples Recipes Bread Recipes Vegetarian Recipes Vegetable recipes Desserts Recipes Appetizers Ethnic Recipes Meat Dishes Barbecue Recipes Sauces Recipes Marinade Recipes Low Fat Recipes Frugal Gourmet Kitchen Classics Recipes On The Grill Cook Books Seafood Recipes Cajun Recipes Breads Low Fat Low Fat Breads Bread Machine Recipes Yeast Breads Quick Breads Fat Free Vegetarian Salad Recipes Eggplant Recipes Radish Recipes Tomato Recipes Jalapeno Recipes Potato Recipes Lettuce Recipes Cabbage Recipes Beans Ambrosia Recipes Biscotti Recipes Desserts Low Fat Cookie Recipes Cheesecake Recipes Cake Recipes Pie Recipes Muffin Recipes Custard Recipes Best Appetizers Appetizers Low Fat Salsa Recipes Dip Recipes International Recipes Afghan Recipes Alaska Recipes French Recipes German Recipes Greek Recipes Italian Recipes Spanish Recipes Thai Recipes Korean Recipes Chinese Recipes Mexican Recipes Indian Recipes Beef Recipes Pork Pork & Ham Pork Butts Pork Chop Recipes Pork Ribs Rulled Pork Poultry Recipes Stews Recipes Ground Beef Barbecue Grill Barbecue Smoker All Purpose Sauce BBQ Sauce Barbecue Sauce Carolina BBQ Sauce Pickle Recipes Marinades Smoking Low Fat Appetizers & Dips Low Fat Breakfast Low Fat Cakes Low Fat Cheesecakes Low Fat Cookies Low Fat Desserts Low Fat Fish & Seafood Low Fat Meats Low Fat Pasta Low Fat Pies Low Fat Salads Low Fat Sandwiches Low Fat Sauces & Condiments Low Fat Sides Low Fat Soups Low Fat Vegetarian Baker's Dozen Taste of Home Recipe Book Bon Appetit Cookbook Blacktie Cookbook Buster Cook Book Cookbook USA Cook Book Cook Book Sara's Cookbook Sara's Cookbook Appetizers and Dips Poultry recipes Diabetic recipes Holiday recipes Miscellaneous recipes 110 recipes 1986 Usenet cookbook 2900 recipes Cyberrealm recipes Great sysops of world Specialty recipes Ceideburg recipes Cheese recipes Chili recipes Fruits recipes Garlic recipes Great chefs of NY Londontowne recipes Raisins recipes Recipes for kids US Food Vegetarian recipes Bread recipes Drinks Meat Dishes Brisket recipes Caribou recipes Chicken recipes Filet mignons recipes Pork recipes Swordfish recipes Turkey recipes Pasta recipes Uncategorized recipes Ethnic recipes Canada recipes English recipes Ethiopia recipes Germany recipes Greece recipes Mexican recipes Philippines recipes Welsh recipes Microwave recipes Soups recipes Vegetable recipes Asparagus recipes Barley recipes Brown rice recipes Lentil recipes Mushrooms recipes Salads recipes Wild rice Desserts recipes Cakes recipes Chocolate recipes Cookies recipes Ice cream recipes