Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I'd like to know wheater it is possible to have a cell shaded once an action
has been taken on it. For example I have each cell in collums [A1] --- [D1] with a drop list/validation. Once action has been taken I'd like for it to become shaded. Is this possible? Thank you in advance. |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi,
If you mean a specific action, ie a specific entry into a cell, then you can do that with conditional formatting. If you mean a more general action, like the selection of an option (but no particular option) from the drop down menu, then you'd need a Change Event macro. Regards - Dave. |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
On Mon, 2 Jun 2008 10:33:00 -0700, Atomic
wrote: I'd like to know wheater it is possible to have a cell shaded once an action has been taken on it. For example I have each cell in collums [A1] --- [D1] with a drop list/validation. Once action has been taken I'd like for it to become shaded. Is this possible? Thank you in advance. Try if this macro does what you expect: Private Sub Worksheet_Change(ByVal Target As Range) If Not Application.Intersect(Target, Range("A1:D1")) Is Nothing Then Target.Interior.ColorIndex = 15 End If End Sub Hope this helps / Lars-Åke |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Thank you Lars-Ã…ke, that is exactly what I had in mind.
I noticed that the colour stayed as is when the entry was removed or deleted. Is there a way to return it to "white" if say I enter a a "00" in the cell or if the entry was deleted? Thank you. "Lars-Ã…ke Aspelin" wrote: On Mon, 2 Jun 2008 10:33:00 -0700, Atomic wrote: I'd like to know wheater it is possible to have a cell shaded once an action has been taken on it. For example I have each cell in collums [A1] --- [D1] with a drop list/validation. Once action has been taken I'd like for it to become shaded. Is this possible? Thank you in advance. Try if this macro does what you expect: Private Sub Worksheet_Change(ByVal Target As Range) If Not Application.Intersect(Target, Range("A1:D1")) Is Nothing Then Target.Interior.ColorIndex = 15 End If End Sub Hope this helps / Lars-Ã…ke |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
The following sets the background color to white if the value entered
is equal to 0. Private Sub Worksheet_Change(ByVal Target As Range) If Not Application.Intersect(Target, Range("A1:D1")) Is Nothing Then Target.Interior.ColorIndex = 15 If Target.Value = 0 Then Target.Interior.ColorIndex = 0 End If End If End Sub Hope this helps / Lars-Åke On Mon, 2 Jun 2008 13:30:02 -0700, Atomic wrote: Thank you Lars-Åke, that is exactly what I had in mind. I noticed that the colour stayed as is when the entry was removed or deleted. Is there a way to return it to "white" if say I enter a a "00" in the cell or if the entry was deleted? Thank you. "Lars-Åke Aspelin" wrote: On Mon, 2 Jun 2008 10:33:00 -0700, Atomic wrote: I'd like to know wheater it is possible to have a cell shaded once an action has been taken on it. For example I have each cell in collums [A1] --- [D1] with a drop list/validation. Once action has been taken I'd like for it to become shaded. Is this possible? Thank you in advance. Try if this macro does what you expect: Private Sub Worksheet_Change(ByVal Target As Range) If Not Application.Intersect(Target, Range("A1:D1")) Is Nothing Then Target.Interior.ColorIndex = 15 End If End Sub Hope this helps / Lars-Åke |
#6
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Thank you Lars-Ã…ke, again. I'll study this formula now and try some new things.
really appreciate it. ^_^)v "Lars-Ã…ke Aspelin" wrote: The following sets the background color to white if the value entered is equal to 0. Private Sub Worksheet_Change(ByVal Target As Range) If Not Application.Intersect(Target, Range("A1:D1")) Is Nothing Then Target.Interior.ColorIndex = 15 If Target.Value = 0 Then Target.Interior.ColorIndex = 0 End If End If End Sub Hope this helps / Lars-Ã…ke On Mon, 2 Jun 2008 13:30:02 -0700, Atomic wrote: Thank you Lars-Ã…ke, that is exactly what I had in mind. I noticed that the colour stayed as is when the entry was removed or deleted. Is there a way to return it to "white" if say I enter a a "00" in the cell or if the entry was deleted? Thank you. "Lars-Ã…ke Aspelin" wrote: On Mon, 2 Jun 2008 10:33:00 -0700, Atomic wrote: I'd like to know wheater it is possible to have a cell shaded once an action has been taken on it. For example I have each cell in collums [A1] --- [D1] with a drop list/validation. Once action has been taken I'd like for it to become shaded. Is this possible? Thank you in advance. Try if this macro does what you expect: Private Sub Worksheet_Change(ByVal Target As Range) If Not Application.Intersect(Target, Range("A1:D1")) Is Nothing Then Target.Interior.ColorIndex = 15 End If End Sub Hope this helps / Lars-Ã…ke |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Creating a Macro For Shading Rows - Or Should I Use Conditional Formatting? | Excel Worksheet Functions | |||
Conditional Cell Shading (based on the shading of other cells) | Excel Worksheet Functions | |||
shading a rowwhen a time is entered but no shading when 0 is enter | Excel Worksheet Functions | |||
Shading cells with a Macro | Excel Discussion (Misc queries) | |||
Is there a formula, function or macro that accounts for shading of a cell or row? | Excel Discussion (Misc queries) |