I want to add YES or NO to a cell in EXCEL. If I type YES I want cell to
automatically colour GREEN. If I type NO I want cell to automatically colour
RED with the adjacent cell also to colour RED.
Any help apprecaited.
I want to add YES or NO to a cell in EXCEL. If I type YES I want cell to
automatically colour GREEN. If I type NO I want cell to automatically colour
RED with the adjacent cell also to colour RED.
Any help apprecaited.
Take a look at Conditional Formatting in XL Help.
In article <[email protected]>,
Kenny @ TLGC <Kenny @ [email protected]> wrote:
> I want to add YES or NO to a cell in EXCEL. If I type YES I want cell to
> automatically colour GREEN. If I type NO I want cell to automatically colour
> RED with the adjacent cell also to colour RED.
> Any help apprecaited.
this won't help the cell adjacent to it though
insert this in the worksheet object
but the interior.colorindex will change the background color
the font.colorindex will change the font color, since you did not specify
the one you needed I reccomend you comment out or delete the one you don't
want or else you will not see what you type
Private Sub Worksheet_Change(ByVal Target As Range)
if target.value = "YES" then
target.Font.ColorIndex = 4
target.Interior.ColorIndex = 4
end if
if target.value = "NO" then
range(cells(target.row,target.column),cells(target.row,target.column+1)).select
selection.Interior.ColorIndex = 3
selection.Font.ColorIndex = 3
end if
end sub
"JE McGimpsey" wrote:
> Take a look at Conditional Formatting in XL Help.
>
> In article <[email protected]>,
> Kenny @ TLGC <Kenny @ [email protected]> wrote:
>
> > I want to add YES or NO to a cell in EXCEL. If I type YES I want cell to
> > automatically colour GREEN. If I type NO I want cell to automatically colour
> > RED with the adjacent cell also to colour RED.
> > Any help apprecaited.
>
conditional formatting won't help the cell adjacent to it though
insert this in the worksheet object
but the interior.colorindex will change the background color
the font.colorindex will change the font color, since you did not specify
the one you needed I reccomend you comment out or delete the one you don't
want or else you will not see what you type
Private Sub Worksheet_Change(ByVal Target As Range)
if target.value = "YES" then
target.Font.ColorIndex = 4
target.Interior.ColorIndex = 4
end if
if target.value = "NO" then
range(cells(target.row,target.column),cells(target.row,target.column+1)).select
selection.Interior.ColorIndex = 3
selection.Font.ColorIndex = 3
end if
end sub
"JE McGimpsey" wrote:
> Take a look at Conditional Formatting in XL Help.
>
> In article <[email protected]>,
> Kenny @ TLGC <Kenny @ [email protected]> wrote:
>
> > I want to add YES or NO to a cell in EXCEL. If I type YES I want cell to
> > automatically colour GREEN. If I type NO I want cell to automatically colour
> > RED with the adjacent cell also to colour RED.
> > Any help apprecaited.
>
Of course it will...
Select A1 & B1
CF1: Formula is =($A1="YES")
Format1: Green
CF2: Formula is =($A1="NO")
Format2: Red
In article <[email protected]>,
ben <[email protected]> wrote:
> conditional formatting won't help the cell adjacent to it though
Can you have a conditional format that says if Cell J1 is 'Yes' then cell D1 is colour filled a particular colour (but J1 is not colour filled)?
Hi
this can be achieved via conditional formatting
select the cell that you want to go green or red
choose format / conditional formatting
choose
value is
equal to
type
yes
click format - choose green - ok
choose ADD
choose
value is
type
no
click format - choose red - ok twice
now choose the cell that you want to go red if the previous cell goes red
choose format / conditional formatting
choose
formula is
type
=$A1="NO"
(where A1 is the cell reference of the previous cell)
click format ...etc
Cheers
JulieD
"Kenny @ TLGC" <Kenny @ [email protected]> wrote in message
news:[email protected]...
>I want to add YES or NO to a cell in EXCEL. If I type YES I want cell to
> automatically colour GREEN. If I type NO I want cell to automatically
> colour
> RED with the adjacent cell also to colour RED.
> Any help apprecaited.
good point, never mind my post this is much smarter lol
"JulieD" wrote:
> Hi
>
> this can be achieved via conditional formatting
> select the cell that you want to go green or red
> choose format / conditional formatting
> choose
> value is
> equal to
> type
> yes
> click format - choose green - ok
> choose ADD
> choose
> value is
> type
> no
> click format - choose red - ok twice
>
> now choose the cell that you want to go red if the previous cell goes red
> choose format / conditional formatting
> choose
> formula is
> type
> =$A1="NO"
> (where A1 is the cell reference of the previous cell)
> click format ...etc
>
> Cheers
> JulieD
>
>
>
> "Kenny @ TLGC" <Kenny @ [email protected]> wrote in message
> news:[email protected]...
> >I want to add YES or NO to a cell in EXCEL. If I type YES I want cell to
> > automatically colour GREEN. If I type NO I want cell to automatically
> > colour
> > RED with the adjacent cell also to colour RED.
> > Any help apprecaited.
>
>
>
Look at Format=>Conditional Formatting
you don't need code for this.
--
Regards,
Tom Ogilvy
"Kenny @ TLGC" <Kenny @ [email protected]> wrote in message
news:[email protected]...
> I want to add YES or NO to a cell in EXCEL. If I type YES I want cell to
> automatically colour GREEN. If I type NO I want cell to automatically
colour
> RED with the adjacent cell also to colour RED.
> Any help apprecaited.
Damo666 welcome to the forum
Unfortunately your post does not comply with Rule 2 of our Forum RULES. Do not post a question in the thread of another member -- start your own thread.
If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread.
Old threads are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.
1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
2. If your question is resolved, mark it SOLVED using the thread tools
3. Click on the star if you think someone helped you
Regards
Ford
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks