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 24th, 2002, 08:45 AM   #1
technix
Board Regular
 
Join Date: May 2002
Location: Grand Rapids, MI
Posts: 326
Default

with the generous help of Mudface I have conquered my Conditional Format for line coloring, Now is it possible if cell G3 = Cash to Format the text to be bold, and ALL Caps when it changes the line color
Thank you in advance.

technix is offline   Reply With Quote
Old May 24th, 2002, 09:08 AM   #2
Mark W.
MrExcel MVP
 
Join Date: Feb 2002
Location: Austin, Texas USA
Posts: 11,654
Default

"ALL Caps" is not a formatting option. Changing a character from lower to upper case is a change in the value itself (e.g., changing "a" to "A" alters the ASCII representation of the original value from 97 to 65.) Excel formatting never changes the contents of a cell -- only how it's displayed.
Mark W. is offline   Reply With Quote
Old May 24th, 2002, 09:17 AM   #3
technix
Board Regular
 
Join Date: May 2002
Location: Grand Rapids, MI
Posts: 326
Default

With that in mind there wouldnt be a way to have it change that value then. So that whatever text(not #'s) was entered would make them all caps?

thank you
technix is offline   Reply With Quote
Old May 24th, 2002, 02:07 PM   #4
Mark W.
MrExcel MVP
 
Join Date: Feb 2002
Location: Austin, Texas USA
Posts: 11,654
Default

Conditional formatting would not do it, but perhaps some one could write a macro for you.

[ This Message was edited by: Mark W. on 2002-05-24 13:07 ]
Mark W. is offline   Reply With Quote
Old May 26th, 2002, 08:32 AM   #5
Tom Urtis
MrExcel MVP
 
Tom Urtis's Avatar
 
Join Date: Feb 2002
Location: San Francisco, California USA
Posts: 10,388
Default

Would this help you? Right click on your sheet tab, left click on View Code, and paste this in:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address <> "$G$3" Or Target.Cells.Count > 1 Then Exit Sub
If Target.Value <> "Cash" Then
Target.Font.Bold = False
Else
With Target
.Value = "CASH"
.Font.Bold = True
End With
End If
End Sub

Notice a quirk that can be modified -- if anyone enters "CASH" in G3 then that will not trigger the macro...I interpreted your post as if "Cash" is the prevalent entry.

Also, I assumed the only time you want G3 bold is if "Cash" is entered (yielding "CASH").

I'm not familiar with your original post, so this code may affect your conditional formatting for the line coloring. If so, please post a follow-up.

HTH
__________________
Tom Urtis
Microsoft MVP - Excel
Tom Urtis is offline   Reply With Quote
Old May 26th, 2002, 12:35 PM   #6
Joe Was
MrExcel MVP
 
Joe Was's Avatar
 
Join Date: Feb 2002
Location: Central Florida, USA
Posts: 7,541
Default

You can use the UCase method to change any input to all upper-case text. Here are a few ways:

Private Sub Worksheet_Change(ByVal Target As Range)
'Worksheet module automatic code.
'All text in columns B&C to upper-case.

Dim rCells As Range
Application.EnableEvents = False
If Not Intersect(Target, Columns("B:C")) Is Nothing Then
For Each rCells In Intersect(Target, Columns("B:C"))
rCells = UCase(rCells.Text)
Next
End If
Application.EnableEvents = True
End Sub

Sub myOneUCase()
'Module code, make selected cell upper-case.

Dim rCells As Range
Set rCells = Selection.Cells
Selection = UCase(rCells)
End Sub


Sub myBold()
'Make selected cell, bold.

Selection.Font.Bold = True
End Sub


Sub ToggleCase()
'Make selected upper-case if now lower-case.
'Make selected lower-case if upper-case now.

Dim rng As Range
For Each rng In Selection.Cells
Select Case True
Case rng = LCase(rng)
rng = UCase(rng)
Case rng = UCase(rng)
rng = Application.Proper(rng)
Case Else
rng = LCase(rng)
End Select
Next
End Sub


Sub myOneLCase()
'Make selection lower-case.

Dim rCells As Range
Set rCells = Selection.Cells
Selection = LCase(rCells)
End Sub

Sub myRegular()
' by Joe Was
'Make coded range regular text, reset text options.

Range("A1:H20").Select
Application.CutCopyMode = False
With Selection.Font
.FontStyle = "Regular"
End With
'Range("A23").Select
End Sub

You can add these codes to other macros or use them as they are. Hope this helps. JSW
Joe Was 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 04:16 PM.


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