ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   More Help (https://www.excelbanter.com/excel-programming/299801-more-help.html)

skate[_3_]

More Help
 
Oh - is it possible to colour the entire row for the condition

so if column 4 = true then fomat the colour of the entire row for tha
value to orange

Is this possible and if so can i do it through conditional formatting

--
Message posted from http://www.ExcelForum.com


Frank Kabel

More Help
 
Hi
try the following
- select row 1
- goto Format - Conditional Format
- enter the formula
=$D1=TRUE
- chhose a format

--
Regards
Frank Kabel
Frankfurt, Germany

"skate " schrieb im Newsbeitrag
...
Oh - is it possible to colour the entire row for the condition

so if column 4 = true then fomat the colour of the entire row for

that
value to orange

Is this possible and if so can i do it through conditional

formatting?


---
Message posted from http://www.ExcelForum.com/



skate[_4_]

More Help
 
Great - only problem is i have a total of 5 conditions and it will onl
allow me to add 3 - is there a way arround this

--
Message posted from http://www.ExcelForum.com


Tom Ogilvy

More Help
 
select the entirerow or rows

assume you have selected rows 10:50

with A10 as the active Cell

Format
conditional Formatting

Change Cell Value is to Formula is

enter a formula like

=$D10=4

then hit the format button, patterns tab and select orange

OK out.

you enter you formula relative to the active cell. Using the $D fixes the
reference to column 4 of the appropriate row.

--
Regards,
Tom Ogilvy

"skate " wrote in message
...
Oh - is it possible to colour the entire row for the condition

so if column 4 = true then fomat the colour of the entire row for that
value to orange

Is this possible and if so can i do it through conditional formatting?


---
Message posted from http://www.ExcelForum.com/




skate[_5_]

More Help
 
I am importing the data from a sql database so i might need to select u
to 1000 cells - that currently are blank ...

--
Message posted from http://www.ExcelForum.com


skate[_6_]

More Help
 
Here is a pic of what i have got so far ...

Attachment filename: screenshot.gif
Download attachment: http://www.excelforum.com/attachment.php?postid=55990
--
Message posted from http://www.ExcelForum.com


Frank Kabel

More Help
 
Hi
only with VBA (using an event procedure) Is this a way to go for you?

--
Regards
Frank Kabel
Frankfurt, Germany


Great - only problem is i have a total of 5 conditions and it will
only allow me to add 3 - is there a way arround this?


---
Message posted from http://www.ExcelForum.com/


skate[_7_]

More Help
 
'START OF CODE
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Dim WatchRange As Range
Dim CellVal As Integer
If Target.Cells.Count 1 Then Exit Sub
If Target = "" Or Not IsNumeric(Target) Then Exit Sub
CellVal = Target
Set WatchRange = Range("A1:A10")

If Not Intersect(Target, WatchRange) Is Nothing Then
Select Case CellVal
Case 0 To 10
Target.Interior.ColorIndex = 5
Case 10 To 20
Target.Interior.ColorIndex = 10
Case 21 To 30
Target.Interior.ColorIndex = 6
Case 31 To 40
Target.Interior.ColorIndex = 46
Case 41 To 50
Target.Interior.ColorIndex = 45
End Select
End If
End Sub
'END OF CODE


i ffound this code as a vb workarround - would this sort of thing work

--
Message posted from http://www.ExcelForum.com


Frank Kabel

More Help
 
Hi
yes this is exactly what you need. To learn more about this kind of
event procedures see:
http://www.cpearson.com/excel/events.htm

--
Regards
Frank Kabel
Frankfurt, Germany


'START OF CODE
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Dim WatchRange As Range
Dim CellVal As Integer
If Target.Cells.Count 1 Then Exit Sub
If Target = "" Or Not IsNumeric(Target) Then Exit Sub
CellVal = Target
Set WatchRange = Range("A1:A10")

If Not Intersect(Target, WatchRange) Is Nothing Then
Select Case CellVal
Case 0 To 10
Target.Interior.ColorIndex = 5
Case 10 To 20
Target.Interior.ColorIndex = 10
Case 21 To 30
Target.Interior.ColorIndex = 6
Case 31 To 40
Target.Interior.ColorIndex = 46
Case 41 To 50
Target.Interior.ColorIndex = 45
End Select
End If
End Sub
'END OF CODE


i ffound this code as a vb workarround - would this sort of thing
work?


---
Message posted from http://www.ExcelForum.com/



Tom Ogilvy

More Help
 
If you are going to type in the values that would work.

If you are importing data, I don't know whether the change event would be
fired or not - I guess you would need to test it with the specific method
you are using.

--
Regards,
Tom Ogilvy

"skate " wrote in message
...
'START OF CODE
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Dim WatchRange As Range
Dim CellVal As Integer
If Target.Cells.Count 1 Then Exit Sub
If Target = "" Or Not IsNumeric(Target) Then Exit Sub
CellVal = Target
Set WatchRange = Range("A1:A10")

If Not Intersect(Target, WatchRange) Is Nothing Then
Select Case CellVal
Case 0 To 10
Target.Interior.ColorIndex = 5
Case 10 To 20
Target.Interior.ColorIndex = 10
Case 21 To 30
Target.Interior.ColorIndex = 6
Case 31 To 40
Target.Interior.ColorIndex = 46
Case 41 To 50
Target.Interior.ColorIndex = 45
End Select
End If
End Sub
'END OF CODE


i ffound this code as a vb workarround - would this sort of thing work?


---
Message posted from http://www.ExcelForum.com/





All times are GMT +1. The time now is 01:12 AM.

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