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 May 2nd, 2002, 05:21 AM   #1
XiniX
Board Regular
 
Join Date: May 2002
Location: Nederland
Posts: 57
Default

I have a sheet where users must input two letters of the postal-code, and the result must be uppercase regardless what the keyboard settings are at the moment of the input. Is there a ucase Cell preset-setting of that column, or do i have to build it into a macro after the input is done. Can anyone help me with this problem?
XiniX is offline   Reply With Quote
Old May 2nd, 2002, 05:27 AM   #2
gareth
Board Regular
 
Join Date: Apr 2002
Location: Cape Town,South Africa
Posts: 234
Default

Try out this download,its free



http://www.asap-utilities.com

check it out,then tell me if you still need a code to perform this duty.
__________________
Regards
Gareth
Visit The Excel Maniacs :<>: Have a Chat! :<>: Free Stuff!
gareth is offline   Reply With Quote
Old May 2nd, 2002, 06:30 AM   #3
XiniX
Board Regular
 
Join Date: May 2002
Location: Nederland
Posts: 57
Default

Will check it out, thank you...

Real cool, fast service...
XiniX is offline   Reply With Quote
Old May 2nd, 2002, 06:44 AM   #4
XiniX
Board Regular
 
Join Date: May 2002
Location: Nederland
Posts: 57
Default

I downloaded it, and installed it...
And it works...

But now it works for my computer. But now it has to run on any computer...

So I have to find my own solution still...
XiniX is offline   Reply With Quote
Old May 2nd, 2002, 06:48 AM   #5
kinkyparamour
Board Regular
 
Join Date: Feb 2002
Location: Florida
Posts: 82
Default

Try using =upper(b1)where your text is in b1.

Denny
kinkyparamour is offline   Reply With Quote
Old May 2nd, 2002, 06:56 AM   #6
Jay Petrulis
MrExcel MVP
 
Jay Petrulis's Avatar
 
Join Date: Mar 2002
Location: Chicago, IL USA
Posts: 2,042
Default

Hi,

For an automatic solution, use a worksheet_change event.

In a sheet module, not a regular code module, place the following:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count = 1 And Target.Column = 2 Then Target = UCase(Target)
End Sub

Change the target.column to your column. It is 2 (= column B) here.
Jay Petrulis is offline   Reply With Quote
Old May 2nd, 2002, 07:19 AM   #7
Aladin Akyurek
MrExcel MVP
 
Aladin Akyurek's Avatar
 
Join Date: Feb 2002
Location: The Hague
Posts: 50,317
Default

Quote:
On 2002-05-02 05:56, Jay Petrulis wrote:
Hi,

For an automatic solution, use a worksheet_change event.

In a sheet module, not a regular code module, place the following:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count = 1 And Target.Column = 2 Then Target = UCase(Target)
End Sub

Change the target.column to your column. It is 2 (= column B) here.
I was just trying to figure out how to do this Worksheet_Change thing. Thanks for ruining my first faux pas into WBA .

I have a question though: Is it possible to variablize/parameterize the target column, for example, forcing the code to read from a cell in a worksheet called Admin?

Aladin
Aladin Akyurek is offline   Reply With Quote
Old May 2nd, 2002, 07:36 AM   #8
Mark O'Brien
MrExcel MVP
 
Mark O'Brien's Avatar
 
Join Date: Feb 2002
Location: Columbus, OH, USA
Posts: 3,519
Default

Quote:

I was just trying to figure out how to do this Worksheet_Change thing. Thanks for ruining my first faux pas into WBA .

I have a question though: Is it possible to variablize/parameterize the target column, for example, forcing the code to read from a cell in a worksheet called Admin?

Aladin
Well, well, well. Crossing over to the dark side are we? Wonders will never cease!

If I'm following you correctly, you want to be able to read data from a specific cell from a sheet named "Admin". (we'll use the old favourite cell, "A1")

Let's say, for example, whenever a value in column A on Sheet1 changed, we want to put the data from "Admin!A1" into "Sheet1!B1"

We would do this:


Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub 'Exit the routine if more than one cell is changing
'This usually leads to horrible errors otherwise

If Target.Column = 1 Then
Sheets("Sheet1").Range("B1").Value = Sheets("Admin").Range("A1").Value
End If
End Sub


If I didn't pick up your example properly, just repost. Basically, anything you can do in a spreadsheet using Excel functions can be accomplished using VBA. (the trick is to find out how to do it )
Mark O'Brien is offline   Reply With Quote
Old May 2nd, 2002, 07:41 AM   #9
XiniX
Board Regular
 
Join Date: May 2002
Location: Nederland
Posts: 57
Default

Thank you Jay, You are super...

[ This Message was edited by: XiniX on 2002-05-02 06:42 ]
XiniX is offline   Reply With Quote
Old May 2nd, 2002, 07:43 AM   #10
Aladin Akyurek
MrExcel MVP
 
Aladin Akyurek's Avatar
 
Join Date: Feb 2002
Location: The Hague
Posts: 50,317
Default

Quote:
On 2002-05-02 06:36, Mark O'Brien wrote:
Quote:

I was just trying to figure out how to do this Worksheet_Change thing. Thanks for ruining my first faux pas into WBA [img]/board/images/smiles/icon_biggrin.gif[/img].

I have a question though: Is it possible to variablize/parameterize the target column, for example, forcing the code to read from a cell in a worksheet called Admin?

Aladin
Well, well, well. Crossing over to the dark side are we? Wonders will never cease!

If I'm following you correctly, you want to be able to read data from a specific cell from a sheet named "Admin". (we'll use the old favourite cell, "A1")

Let's say, for example, whenever a value in column A on Sheet1 changed, we want to put the data from "Admin!A1" into "Sheet1!B1"

We would do this:


Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub 'Exit the routine if more than one cell is changing
'This usually leads to horrible errors otherwise

If Target.Column = 1 Then
Sheets("Sheet1").Range("B1").Value = Sheets("Admin").Range("A1").Value
End If
End Sub


If I didn't pick up your example properly, just repost. Basically, anything you can do in a spreadsheet using Excel functions can be accomplished using VBA. (the trick is to find out how to do it [img]/board/images/smiles/icon_biggrin.gif[/img] )
Mark,

If I didn't pick up your example properly, just repost.

Alas, you didn't .

I want Jay's code to read from Admin!A1 which column it should watch for user input and upper the inputted values.

What modification would the dark side apply to that code?

Aladin

Aladin Akyurek 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 09:27 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