Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
red Color for same value cells
Hi from italy,
sorry if question was already posted but i dont'find anithing on goole : I have a column H1:H:32, example : h1 Alfa h2 Beta h3 Omega h4 Beta h5 Omega h6 Alfa h7 P h8 Alfa h9 P h10 ecc when I click on cell taht contain "Alfa" , i want all "alfa" cell become red if i click on cell that contain "Beta" , all "Beta" cell become red TIA -- ------------------------------------------------------------- se vuoi scrivermi sostituisci tiscali con yahoo ciao |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
red Color for same value cells
Hi from the UK,
here is one way Private Sub Worksheet_SelectionChange(ByVal Target As Range) Dim cell As Range If Not Intersect(Target, Range("H1:H:32")) Is Nothing Then Range("B1:B100").FormatConditions.Delete For Each cell In Range("H1:H:32") cell.FormatConditions.Add Type:=xlExpression, _ Formula1:="=" & cell.Address & "=" & Target.Address cell.FormatConditions(1).Interior.ColorIndex = 3 Next cell End If End Sub it is worksheet event code, so right-click on the sheet tab, select View Code from the menu, and paste the code in -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Aristotele64" wrote in message ... Hi from italy, sorry if question was already posted but i dont'find anithing on goole : I have a column H1:H:32, example : h1 Alfa h2 Beta h3 Omega h4 Beta h5 Omega h6 Alfa h7 P h8 Alfa h9 P h10 ecc when I click on cell taht contain "Alfa" , i want all "alfa" cell become red if i click on cell that contain "Beta" , all "Beta" cell become red TIA -- ------------------------------------------------------------- se vuoi scrivermi sostituisci tiscali con yahoo ciao |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
red Color for same value cells
Hi
though this is possible (using the Selection_change event) this is not that easy. It would be easier if you could enter the value in a separate cell and use conditional format for this -- Regards Frank Kabel Frankfurt, Germany Aristotele64 wrote: Hi from italy, sorry if question was already posted but i dont'find anithing on goole : I have a column H1:H:32, example : h1 Alfa h2 Beta h3 Omega h4 Beta h5 Omega h6 Alfa h7 P h8 Alfa h9 P h10 ecc when I click on cell taht contain "Alfa" , i want all "alfa" cell become red if i click on cell that contain "Beta" , all "Beta" cell become red TIA |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
red Color for same value cells
Frank,
See my answer. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Frank Kabel" wrote in message ... Hi though this is possible (using the Selection_change event) this is not that easy. It would be easier if you could enter the value in a separate cell and use conditional format for this -- Regards Frank Kabel Frankfurt, Germany Aristotele64 wrote: Hi from italy, sorry if question was already posted but i dont'find anithing on goole : I have a column H1:H:32, example : h1 Alfa h2 Beta h3 Omega h4 Beta h5 Omega h6 Alfa h7 P h8 Alfa h9 P h10 ecc when I click on cell taht contain "Alfa" , i want all "alfa" cell become red if i click on cell that contain "Beta" , all "Beta" cell become red TIA |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
red Color for same value cells
Many tkanks !!!!
It's working beatiful !!!! I change only : Range("B1:B100").FormatConditions.Delete in Range("H2:H32").FormatConditions.Delete right ? by and good evining !! "Bob Phillips" ha scritto nel messaggio ... Hi from the UK, here is one way Private Sub Worksheet_SelectionChange(ByVal Target As Range) Dim cell As Range If Not Intersect(Target, Range("H1:H:32")) Is Nothing Then Range("B1:B100").FormatConditions.Delete For Each cell In Range("H1:H:32") cell.FormatConditions.Add Type:=xlExpression, _ Formula1:="=" & cell.Address & "=" & Target.Address cell.FormatConditions(1).Interior.ColorIndex = 3 Next cell End If End Sub it is worksheet event code, so right-click on the sheet tab, select View Code from the menu, and paste the code in -- |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
red Color for same value cells
Bob
saw it - neat BTW :-) I was just too lazy... -- Regards Frank Kabel Frankfurt, Germany Bob Phillips wrote: Frank, See my answer. "Frank Kabel" wrote in message ... Hi though this is possible (using the Selection_change event) this is not that easy. It would be easier if you could enter the value in a separate cell and use conditional format for this -- Regards Frank Kabel Frankfurt, Germany Aristotele64 wrote: Hi from italy, sorry if question was already posted but i dont'find anithing on goole : I have a column H1:H:32, example : h1 Alfa h2 Beta h3 Omega h4 Beta h5 Omega h6 Alfa h7 P h8 Alfa h9 P h10 ecc when I click on cell taht contain "Alfa" , i want all "alfa" cell become red if i click on cell that contain "Beta" , all "Beta" cell become red TIA |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
red Color for same value cells
I tested on B1:B100 and changed just before I posted it. Missed that one.
-- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Aristotele64" wrote in message ... Many tkanks !!!! It's working beatiful !!!! I change only : Range("B1:B100").FormatConditions.Delete in Range("H2:H32").FormatConditions.Delete right ? by and good evining !! "Bob Phillips" ha scritto nel messaggio ... Hi from the UK, here is one way Private Sub Worksheet_SelectionChange(ByVal Target As Range) Dim cell As Range If Not Intersect(Target, Range("H1:H:32")) Is Nothing Then Range("B1:B100").FormatConditions.Delete For Each cell In Range("H1:H:32") cell.FormatConditions.Add Type:=xlExpression, _ Formula1:="=" & cell.Address & "=" & Target.Address cell.FormatConditions(1).Interior.ColorIndex = 3 Next cell End If End Sub it is worksheet event code, so right-click on the sheet tab, select View Code from the menu, and paste the code in -- |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
red Color for same value cells
if only I could get rid of the iterating through all the cells!
-- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Frank Kabel" wrote in message ... Bob saw it - neat BTW :-) I was just too lazy... -- Regards Frank Kabel Frankfurt, Germany Bob Phillips wrote: Frank, See my answer. "Frank Kabel" wrote in message ... Hi though this is possible (using the Selection_change event) this is not that easy. It would be easier if you could enter the value in a separate cell and use conditional format for this -- Regards Frank Kabel Frankfurt, Germany Aristotele64 wrote: Hi from italy, sorry if question was already posted but i dont'find anithing on goole : I have a column H1:H:32, example : h1 Alfa h2 Beta h3 Omega h4 Beta h5 Omega h6 Alfa h7 P h8 Alfa h9 P h10 ecc when I click on cell taht contain "Alfa" , i want all "alfa" cell become red if i click on cell that contain "Beta" , all "Beta" cell become red TIA |
#9
Posted to microsoft.public.excel.programming
|
|||
|
|||
red Color for same value cells
Select H1:H32
with H1 the activeCell format=Conditional formatting formula is: =INDIRECT(CELL("address"))=H1 make red pattern the format. Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Not Intersect(Target, Range("H1:H32")) Is Nothing Then ActiveSheet.Calculate End If End Sub -- Regards, Tom Ogilvy "Frank Kabel" wrote in message ... Bob saw it - neat BTW :-) I was just too lazy... -- Regards Frank Kabel Frankfurt, Germany Bob Phillips wrote: Frank, See my answer. "Frank Kabel" wrote in message ... Hi though this is possible (using the Selection_change event) this is not that easy. It would be easier if you could enter the value in a separate cell and use conditional format for this -- Regards Frank Kabel Frankfurt, Germany Aristotele64 wrote: Hi from italy, sorry if question was already posted but i dont'find anithing on goole : I have a column H1:H:32, example : h1 Alfa h2 Beta h3 Omega h4 Beta h5 Omega h6 Alfa h7 P h8 Alfa h9 P h10 ecc when I click on cell taht contain "Alfa" , i want all "alfa" cell become red if i click on cell that contain "Beta" , all "Beta" cell become red TIA |
#10
Posted to microsoft.public.excel.programming
|
|||
|
|||
red Color for same value cells
Hi bob
maybe changing the conditional format formula via code -- Regards Frank Kabel Frankfurt, Germany Bob Phillips wrote: if only I could get rid of the iterating through all the cells! "Frank Kabel" wrote in message ... Bob saw it - neat BTW :-) I was just too lazy... -- Regards Frank Kabel Frankfurt, Germany Bob Phillips wrote: Frank, See my answer. "Frank Kabel" wrote in message ... Hi though this is possible (using the Selection_change event) this is not that easy. It would be easier if you could enter the value in a separate cell and use conditional format for this -- Regards Frank Kabel Frankfurt, Germany Aristotele64 wrote: Hi from italy, sorry if question was already posted but i dont'find anithing on goole : I have a column H1:H:32, example : h1 Alfa h2 Beta h3 Omega h4 Beta h5 Omega h6 Alfa h7 P h8 Alfa h9 P h10 ecc when I click on cell taht contain "Alfa" , i want all "alfa" cell become red if i click on cell that contain "Beta" , all "Beta" cell become red TIA |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to color automatically color code sums in cells | Charts and Charting in Excel | |||
How do I apply color in cells ..color now shown only in print prev | Excel Worksheet Functions | |||
Excel 2003 will not display color fonts or color fill cells | Excel Worksheet Functions | |||
Color Formatted Cells not showing color | Excel Worksheet Functions | |||
My excel 2003 wont let me fill cells with color or color the tabs. | New Users to Excel |