Right click sheet tab>view code>copy/paste this to make the changes in col G

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column <> 7 Or Target.Count > 1 Then Exit Sub
If Target = 1 Then
Target = 0
Target.Interior.ColorIndex = 4
Else
Target = 1
Target.Interior.ColorIndex = 3
End If
End Sub

Don Guillett
SalesAid Software
dguille...@gmail.com

From: Cab Boose 
Sent: Friday, October 14, 2011 2:33 AM
To: excel-macros@googlegroups.com 
Subject: $$Excel-Macros$$ Toggle a Cell value

Hi eveyrone

See attached sheet.

For a 12 volt motor speed direction, Forward or Reverse  I want to have a value 
of a cell to toggle back and forth between 0 and 1 and cell color also to 
change each time between green and red.

Prefer to use a cell than use a toggle button, unless a toggle button can 
change colors etc and the value of 0 or 1  from the toggle button can be used 
to export etc

Your comments would be appreciated.

Charlie Harris
-- 
----------------------------------------------------------------------------------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com

To post to this group, send email to excel-macros@googlegroups.com
 
<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel

-- 
----------------------------------------------------------------------------------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel

Reply via email to