#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 29
Default Change color

Good day,

I don't know if this is possible in Excel, but I would like to change the
background color of a cell as soon as it has been typed in. Is this even
possible?
--
Thanks for your help!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Change color

Try this,

Public OldRng As Range

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not OldRng Is Nothing Then
OldRng.Interior.ColorIndex = 35 'Awful green, change to taste
If OldRng.Value = "" Then OldRng.Interior.ColorIndex = xlNone
End If
Set OldRng = Target
End Sub

Right click the sheet tab, view code and paste in.

Mike


"TamIam" wrote:

Good day,

I don't know if this is possible in Excel, but I would like to change the
background color of a cell as soon as it has been typed in. Is this even
possible?
--
Thanks for your help!

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 29
Default Change color

Thanks Mike! It worked, however, because I have inserted formulas throughout
the spreadsheet, I only really wanted it to change color when I typed over
any given formula. This is probably not possible, but I appreciate your
response, thanks again!
--
Thanks for your help!


"Mike H" wrote:

Try this,

Public OldRng As Range

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not OldRng Is Nothing Then
OldRng.Interior.ColorIndex = 35 'Awful green, change to taste
If OldRng.Value = "" Then OldRng.Interior.ColorIndex = xlNone
End If
Set OldRng = Target
End Sub

Right click the sheet tab, view code and paste in.

Mike


"TamIam" wrote:

Good day,

I don't know if this is possible in Excel, but I would like to change the
background color of a cell as soon as it has been typed in. Is this even
possible?
--
Thanks for your help!

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Change color

I'm glad it helped and had you asked for formula then that is doable.
However, before I try I'm nervous about

when I typed over
any given formula


Is this different than any formula?

Mike

"TamIam" wrote:

Thanks Mike! It worked, however, because I have inserted formulas throughout
the spreadsheet, I only really wanted it to change color when I typed over
any given formula. This is probably not possible, but I appreciate your
response, thanks again!
--
Thanks for your help!


"Mike H" wrote:

Try this,

Public OldRng As Range

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not OldRng Is Nothing Then
OldRng.Interior.ColorIndex = 35 'Awful green, change to taste
If OldRng.Value = "" Then OldRng.Interior.ColorIndex = xlNone
End If
Set OldRng = Target
End Sub

Right click the sheet tab, view code and paste in.

Mike


"TamIam" wrote:

Good day,

I don't know if this is possible in Excel, but I would like to change the
background color of a cell as soon as it has been typed in. Is this even
possible?
--
Thanks for your help!

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 29
Default Change color

No...just me being strange...I have a vlookup formula in every cell and when
I type over the formula even if it results in the same value as the formula,
I wanted the cell to change...this is my struggle...I can change the colour
with the conditional format cell value does not equal to, however, if I
actually want the same value manually typed in as the formula would result
in, I would still like to see that it has been type in...too much info I
know. Thanks again Mike! You've been awesome!
--
Thanks for your help!


"Mike H" wrote:

I'm glad it helped and had you asked for formula then that is doable.
However, before I try I'm nervous about

when I typed over
any given formula


Is this different than any formula?

Mike

"TamIam" wrote:

Thanks Mike! It worked, however, because I have inserted formulas throughout
the spreadsheet, I only really wanted it to change color when I typed over
any given formula. This is probably not possible, but I appreciate your
response, thanks again!
--
Thanks for your help!


"Mike H" wrote:

Try this,

Public OldRng As Range

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not OldRng Is Nothing Then
OldRng.Interior.ColorIndex = 35 'Awful green, change to taste
If OldRng.Value = "" Then OldRng.Interior.ColorIndex = xlNone
End If
Set OldRng = Target
End Sub

Right click the sheet tab, view code and paste in.

Mike


"TamIam" wrote:

Good day,

I don't know if this is possible in Excel, but I would like to change the
background color of a cell as soon as it has been typed in. Is this even
possible?
--
Thanks for your help!

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can you change the color of one cell based on the color of another andoscott Excel Discussion (Misc queries) 4 May 4th 07 04:02 PM
how can I conditionally change font color, or background color? MOHA Excel Worksheet Functions 3 August 21st 06 06:57 PM
How to change the default Border, Font Color, and Cell Color Elijah Excel Discussion (Misc queries) 3 November 2nd 05 11:52 PM
Change of text or background color doesn't change on the screen. Susan Excel Discussion (Misc queries) 5 July 29th 05 07:18 PM
Allow users to change the color of the comment indicator color so. DanC Excel Discussion (Misc queries) 1 February 25th 05 05:15 PM


All times are GMT +1. The time now is 10:11 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"