Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 37
Default Format changed when the details in cell changed

I want when a cell is changed, the font colour will be changed from black
to bold white and the background colour will be changed to red.

I want this function to apply to the whole spreadsheet

Can it be done by a VBA code or any other ways? Please kindly advise.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,646
Default Format changed when the details in cell changed

Try this event sub:
Private Sub Worksheet_Change(ByVal Target As Range)
Target.Font.ColorIndex = 2
Target.Font.Bold = True
Target.Interior.ColorIndex = 3
End Sub
Post if you need help to install it!

Regards,
Stefi


€žangel€ť ezt Ă*rta:

I want when a cell is changed, the font colour will be changed from black
to bold white and the background colour will be changed to red.

I want this function to apply to the whole spreadsheet

Can it be done by a VBA code or any other ways? Please kindly advise.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 37
Default Format changed when the details in cell changed

thanks, it works perfect

however, i would like to use it for on-going updates purpose

for instance:
column A B
2.1 10
2.2 11
2.2 12

suppose "10" and "11" are changed to "100", by using your formula, both of
them will change from black to bold white and the background colour will be
changed to red. then i save it.

then when i re-open it next time, i would like everything to be normal again
(eg. both "100" will be the same with all the other fields, NOT in bold
white), and if any field is changed, its format will be changed again as
well. so that it will be very easy to spot which fields have been changed
for each update.

please kindly advise, thanks =)

"Stefi" wrote:

Try this event sub:
Private Sub Worksheet_Change(ByVal Target As Range)
Target.Font.ColorIndex = 2
Target.Font.Bold = True
Target.Interior.ColorIndex = 3
End Sub
Post if you need help to install it!

Regards,
Stefi


€žangel€ť ezt Ă*rta:

I want when a cell is changed, the font colour will be changed from black
to bold white and the background colour will be changed to red.

I want this function to apply to the whole spreadsheet

Can it be done by a VBA code or any other ways? Please kindly advise.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default Format changed when the details in cell changed

Add this event code to Thisworkbook module to clear the colors when the workbook
opens.

Private Sub Workbook_Open()
With Sheets("Sheet1") 'edit name to suit
.Cells.Interior.ColorIndex = xlNone
End With
End Sub

Also, Stefi's sheet event code can be changed slightly since the code works only
on one Target at a time.

Private Sub Worksheet_Change(ByVal Target As Range)
With Target
.Font.ColorIndex = 2
.Font.Bold = True
.Interior.ColorIndex = 3
End With
End Sub


Gord Dibben MS Excel MVP

On Thu, 10 Jul 2008 08:05:00 -0700, angel
wrote:

thanks, it works perfect

however, i would like to use it for on-going updates purpose

for instance:
column A B
2.1 10
2.2 11
2.2 12

suppose "10" and "11" are changed to "100", by using your formula, both of
them will change from black to bold white and the background colour will be
changed to red. then i save it.

then when i re-open it next time, i would like everything to be normal again
(eg. both "100" will be the same with all the other fields, NOT in bold
white), and if any field is changed, its format will be changed again as
well. so that it will be very easy to spot which fields have been changed
for each update.

please kindly advise, thanks =)

"Stefi" wrote:

Try this event sub:
Private Sub Worksheet_Change(ByVal Target As Range)
Target.Font.ColorIndex = 2
Target.Font.Bold = True
Target.Interior.ColorIndex = 3
End Sub
Post if you need help to install it!

Regards,
Stefi


„angel” ezt írta:

I want when a cell is changed, the font colour will be changed from black
to bold white and the background colour will be changed to red.

I want this function to apply to the whole spreadsheet

Can it be done by a VBA code or any other ways? Please kindly advise.


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 37
Default Format changed when the details in cell changed

thanks very much!!
but where is "thisworkbook module"?

"Gord Dibben" wrote:

Add this event code to Thisworkbook module to clear the colors when the workbook
opens.

Private Sub Workbook_Open()
With Sheets("Sheet1") 'edit name to suit
.Cells.Interior.ColorIndex = xlNone
End With
End Sub

Also, Stefi's sheet event code can be changed slightly since the code works only
on one Target at a time.

Private Sub Worksheet_Change(ByVal Target As Range)
With Target
.Font.ColorIndex = 2
.Font.Bold = True
.Interior.ColorIndex = 3
End With
End Sub


Gord Dibben MS Excel MVP

On Thu, 10 Jul 2008 08:05:00 -0700, angel
wrote:

thanks, it works perfect

however, i would like to use it for on-going updates purpose

for instance:
column A B
2.1 10
2.2 11
2.2 12

suppose "10" and "11" are changed to "100", by using your formula, both of
them will change from black to bold white and the background colour will be
changed to red. then i save it.

then when i re-open it next time, i would like everything to be normal again
(eg. both "100" will be the same with all the other fields, NOT in bold
white), and if any field is changed, its format will be changed again as
well. so that it will be very easy to spot which fields have been changed
for each update.

please kindly advise, thanks =)

"Stefi" wrote:

Try this event sub:
Private Sub Worksheet_Change(ByVal Target As Range)
Target.Font.ColorIndex = 2
Target.Font.Bold = True
Target.Interior.ColorIndex = 3
End Sub
Post if you need help to install it!

Regards,
Stefi


€žangel€ť ezt Ă*rta:

I want when a cell is changed, the font colour will be changed from black
to bold white and the background colour will be changed to red.

I want this function to apply to the whole spreadsheet

Can it be done by a VBA code or any other ways? Please kindly advise.





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default Format changed when the details in cell changed

Right-click on the Excel Icon left of "File" on the menubar and select "View
Code"

Paste the workbook_open code into that module.

The other code stays in the sheet module.


Gord

On Thu, 10 Jul 2008 09:41:10 -0700, angel
wrote:

thanks very much!!
but where is "thisworkbook module"?

"Gord Dibben" wrote:

Add this event code to Thisworkbook module to clear the colors when the workbook
opens.

Private Sub Workbook_Open()
With Sheets("Sheet1") 'edit name to suit
.Cells.Interior.ColorIndex = xlNone
End With
End Sub

Also, Stefi's sheet event code can be changed slightly since the code works only
on one Target at a time.

Private Sub Worksheet_Change(ByVal Target As Range)
With Target
.Font.ColorIndex = 2
.Font.Bold = True
.Interior.ColorIndex = 3
End With
End Sub


Gord Dibben MS Excel MVP

On Thu, 10 Jul 2008 08:05:00 -0700, angel
wrote:

thanks, it works perfect

however, i would like to use it for on-going updates purpose

for instance:
column A B
2.1 10
2.2 11
2.2 12

suppose "10" and "11" are changed to "100", by using your formula, both of
them will change from black to bold white and the background colour will be
changed to red. then i save it.

then when i re-open it next time, i would like everything to be normal again
(eg. both "100" will be the same with all the other fields, NOT in bold
white), and if any field is changed, its format will be changed again as
well. so that it will be very easy to spot which fields have been changed
for each update.

please kindly advise, thanks =)

"Stefi" wrote:

Try this event sub:
Private Sub Worksheet_Change(ByVal Target As Range)
Target.Font.ColorIndex = 2
Target.Font.Bold = True
Target.Interior.ColorIndex = 3
End Sub
Post if you need help to install it!

Regards,
Stefi


„angel” ezt írta:

I want when a cell is changed, the font colour will be changed from black
to bold white and the background colour will be changed to red.

I want this function to apply to the whole spreadsheet

Can it be done by a VBA code or any other ways? Please kindly advise.




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
Format changed when the cell selected Freshman Excel Worksheet Functions 5 May 26th 08 10:34 AM
cell format changed when data entered John Keith Excel Discussion (Misc queries) 1 September 14th 07 06:04 AM
Cell format has suddenly changed in all new spread sheets Andy Excel Discussion (Misc queries) 5 October 29th 06 08:16 AM
cell format refuses to be changed Alyssa Excel Discussion (Misc queries) 5 July 21st 06 10:27 AM
replace one tag in content of one cell and format not changed replace one tag in content of one cell a Excel Discussion (Misc queries) 1 January 9th 06 03:36 PM


All times are GMT +1. The time now is 07:44 AM.

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

About Us

"It's about Microsoft Excel"