ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Formatting Selection of cells. (https://www.excelbanter.com/excel-discussion-misc-queries/70800-formatting-selection-cells.html)

jimbob007

Formatting Selection of cells.
 

My database contains rows of information which can be subdivided into 3
types <1,2 and 3. I set up a filter but would like it to automatically
format the rows of categories 1 and 2 leaving 3 untouched. For instance
change colour of rows for cat 1 and change text font for rows for cat 2
when I enter these numbers in the relevant cells.

IS THIS POSSIBLE?


--
jimbob007
------------------------------------------------------------------------
jimbob007's Profile: http://www.excelforum.com/member.php...o&userid=31399
View this thread: http://www.excelforum.com/showthread...hreadid=510976


Bob Phillips

Formatting Selection of cells.
 
Conditional formatting - menu FormatConditional Formatting

Add a condition for values equal to cat 1 and another for cat 2. You can set
the set the font attributes and the pattern attributes.

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"jimbob007" wrote
in message ...

My database contains rows of information which can be subdivided into 3
types <1,2 and 3. I set up a filter but would like it to automatically
format the rows of categories 1 and 2 leaving 3 untouched. For instance
change colour of rows for cat 1 and change text font for rows for cat 2
when I enter these numbers in the relevant cells.

IS THIS POSSIBLE?


--
jimbob007
------------------------------------------------------------------------
jimbob007's Profile:

http://www.excelforum.com/member.php...o&userid=31399
View this thread: http://www.excelforum.com/showthread...hreadid=510976




Stefi

Formatting Selection of cells.
 
Yes, you can do that with a Change event procedure something like this one:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 1 Then 'Column A marking your categories
Select Case Target.Value
Case 1
Rows(Target.Row).Interior.ColorIndex = 6
Case 2
Rows(Target.Row).Font.Name = "Times"
End Select
End If
End Sub

Regards,
Stefi

€˛jimbob007€¯ ezt Ć*rta:


My database contains rows of information which can be subdivided into 3
types <1,2 and 3. I set up a filter but would like it to automatically
format the rows of categories 1 and 2 leaving 3 untouched. For instance
change colour of rows for cat 1 and change text font for rows for cat 2
when I enter these numbers in the relevant cells.

IS THIS POSSIBLE?


--
jimbob007
------------------------------------------------------------------------
jimbob007's Profile: http://www.excelforum.com/member.php...o&userid=31399
View this thread: http://www.excelforum.com/showthread...hreadid=510976



jimbob007

Formatting Selection of cells.
 

Thank you for each of your time. I appreciate all your help.

Kind Regards,
jimbob007


--
jimbob007
------------------------------------------------------------------------
jimbob007's Profile: http://www.excelforum.com/member.php...o&userid=31399
View this thread: http://www.excelforum.com/showthread...hreadid=510976



All times are GMT +1. The time now is 08:44 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com