ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Conditional formatting ???? (https://www.excelbanter.com/excel-discussion-misc-queries/192010-conditional-formatting.html)

dazoloko via OfficeKB.com

Conditional formatting ????
 
Dear All

Is it possible to colour a range of cells based upon a check box ie if it is
checked, a particular range is green or if its unchecked the range is red ?

Thanks in anticipation

D

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/200806/1


Nayab

Conditional formatting ????
 
On Jun 20, 1:57*pm, "dazoloko via OfficeKB.com" <u43760@uwe wrote:
Dear All

Is it possible to colour a range of cells based upon a check box ie if it is
checked, a particular range is green or if its unchecked the range is red ?

Thanks in anticipation

D

--
Message posted via OfficeKB.comhttp://www.officekb.com/Uwe/Forums.aspx/ms-excel/200806/1


I think u can do it via Vb. U can check if the checkbox ischecked.
then u can format the range and specify the color

dazoloko via OfficeKB.com

Conditional formatting ????
 
Thanks for the repsonse, not being an expert on vb can anyone assist with the
code then im assuming if I have more than 1 checkbox relating to different
ranges id need the code for each one ?

Cheers

D


Nayab wrote:
Dear All

[quoted text clipped - 7 lines]
--
Message posted via OfficeKB.comhttp://www.officekb.com/Uwe/Forums.aspx/ms-excel/200806/1


I think u can do it via Vb. U can check if the checkbox ischecked.
then u can format the range and specify the color


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/200806/1


Mike H

Conditional formatting ????
 
Hi,

Put a checkbox from the 'Forms' toolbox on your sheet. Right click is and
apply this macro

Sub CheckBox1_Click()
If ActiveSheet.CheckBoxes("Check Box 1").Value = xlOn Then
Range("A1").Interior.ColorIndex = 3
Else
Range("A1").Interior.ColorIndex = xlNone
End If
End Sub

Change the range and colour to suit your requirements.

Mike

"dazoloko via OfficeKB.com" wrote:

Dear All

Is it possible to colour a range of cells based upon a check box ie if it is
checked, a particular range is green or if its unchecked the range is red ?

Thanks in anticipation

D

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/200806/1



dazoloko via OfficeKB.com

Conditional formatting ????
 
Mike H

Yet again youve come up with the goods, a true legend !!!

D


Mike H wrote:
Hi,

Put a checkbox from the 'Forms' toolbox on your sheet. Right click is and
apply this macro

Sub CheckBox1_Click()
If ActiveSheet.CheckBoxes("Check Box 1").Value = xlOn Then
Range("A1").Interior.ColorIndex = 3
Else
Range("A1").Interior.ColorIndex = xlNone
End If
End Sub

Change the range and colour to suit your requirements.

Mike

Dear All

[quoted text clipped - 4 lines]

D


--
Message posted via http://www.officekb.com


Mike H

Conditional formatting ????
 
I'm glad I could help

"dazoloko via OfficeKB.com" wrote:

Mike H

Yet again youve come up with the goods, a true legend !!!

D


Mike H wrote:
Hi,

Put a checkbox from the 'Forms' toolbox on your sheet. Right click is and
apply this macro

Sub CheckBox1_Click()
If ActiveSheet.CheckBoxes("Check Box 1").Value = xlOn Then
Range("A1").Interior.ColorIndex = 3
Else
Range("A1").Interior.ColorIndex = xlNone
End If
End Sub

Change the range and colour to suit your requirements.

Mike

Dear All

[quoted text clipped - 4 lines]

D


--
Message posted via http://www.officekb.com



MyVeryOwnSelf

Conditional formatting ????
 
Is it possible to colour a range of cells based upon a check box ie if
it is checked, a particular range is green or if its unchecked the
range is red ?


Here's one way.

After adding a check-box using the Forms tool bar, right-click on the tool
check-box and use
Format control Control

There, select the "Unchecked" button, and in the "Cell link" indicate a
helper cell in some out-of-the-way place. That cell will contain logical
TRUE or FALSE depending on whether or not the check-box is checked. Then
select the "range of cells" and use
Format Conditional formatting
With formulas referring to the helper cell.


All times are GMT +1. The time now is 02:48 PM.

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