Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 12
Default Conditional Formats for formulae and values

Cell A5 contains a formula with that cell unlocked. The formula gives a
prompt to the user who can then either accept the forluma's 'suggestion' or
overtype that formula with a value. The default font format is Arial 10 with
half scale grey. If the user chooses to overtype that formula, I want the
result to show as bold and black (or automatic). The sheet will then
effectively highlight (in bold) those cells where the formula has been
overtyped. (I don't think it makes a difference but A5 default format is
custom 'hh:mm').
I've tried all types or conditional formatting but cannot get the correct
result !
GrahamB


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default Conditional Formats for formulae and values

Hi Graham:

Paste the following macro into Worksheet code:

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("A5")) Is Nothing Then
Exit Sub
End If
With Range("A5")
If .HasFormula Then
Exit Sub
End If
.ClearFormats
.Font.FontStyle = "bold"
.Font.ColorIndex = xlAutomatic
End With
End Sub

If you are not familiar with VBA, see:

http://www.mvps.org/dmcritchie/excel/getstarted.htm
--
Gary's Student


"GrahamB" wrote:

Cell A5 contains a formula with that cell unlocked. The formula gives a
prompt to the user who can then either accept the forluma's 'suggestion' or
overtype that formula with a value. The default font format is Arial 10 with
half scale grey. If the user chooses to overtype that formula, I want the
result to show as bold and black (or automatic). The sheet will then
effectively highlight (in bold) those cells where the formula has been
overtyped. (I don't think it makes a difference but A5 default format is
custom 'hh:mm').
I've tried all types or conditional formatting but cannot get the correct
result !
GrahamB



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 12
Default Conditional Formats for formulae and values

Hello "Gary's Student",
Many thanks for your reply; although fairly new to this, i am always
surprised (and grateful) that experts like you spend thier time and effort
helping newbies. It may be some days before i can re-post as I have some
reading to do (!) but many thanks, i will respond in due course.
GrahamB

"Gary''s Student" wrote in message
...
Hi Graham:

Paste the following macro into Worksheet code:

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("A5")) Is Nothing Then
Exit Sub
End If
With Range("A5")
If .HasFormula Then
Exit Sub
End If
.ClearFormats
.Font.FontStyle = "bold"
.Font.ColorIndex = xlAutomatic
End With
End Sub

If you are not familiar with VBA, see:

http://www.mvps.org/dmcritchie/excel/getstarted.htm
--
Gary's Student


"GrahamB" wrote:

Cell A5 contains a formula with that cell unlocked. The formula gives a
prompt to the user who can then either accept the forluma's 'suggestion'
or
overtype that formula with a value. The default font format is Arial 10
with
half scale grey. If the user chooses to overtype that formula, I want the
result to show as bold and black (or automatic). The sheet will then
effectively highlight (in bold) those cells where the formula has been
overtyped. (I don't think it makes a difference but A5 default format is
custom 'hh:mm').
I've tried all types or conditional formatting but cannot get the correct
result !
GrahamB





  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 12
Default Conditional Formats for formulae and values

Hi "Gary's Student",
Many thanks for your help. I pasted your code into the Worksheet (after
right clicking on sheet tab and then 'View Code'). The problem that occurred
is that the format changed to either general or number, and the expected
result of One hour as a Bold and Centred '01:00' appeared as
'0.0416666666666667'. I've tried recording a Macro to change the format to
custom time and then pasting it into your code but my knowledge it too poor
to get it to work. Any help would be appreciated !
Cheers
GrahamB

"Gary''s Student" wrote in message
...
Hi Graham:

Paste the following macro into Worksheet code:

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("A5")) Is Nothing Then
Exit Sub
End If
With Range("A5")
If .HasFormula Then
Exit Sub
End If
.ClearFormats
.Font.FontStyle = "bold"
.Font.ColorIndex = xlAutomatic
End With
End Sub

If you are not familiar with VBA, see:

http://www.mvps.org/dmcritchie/excel/getstarted.htm
--
Gary's Student


"GrahamB" wrote:

Cell A5 contains a formula with that cell unlocked. The formula gives a
prompt to the user who can then either accept the forluma's 'suggestion'
or
overtype that formula with a value. The default font format is Arial 10
with
half scale grey. If the user chooses to overtype that formula, I want the
result to show as bold and black (or automatic). The sheet will then
effectively highlight (in bold) those cells where the formula has been
overtyped. (I don't think it makes a difference but A5 default format is
custom 'hh:mm').
I've tried all types or conditional formatting but cannot get the correct
result !
GrahamB





  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default Conditional Formats for formulae and values

I will update this post tomorrow.
--
Gary's Student
gsnu200701


"GrahamB" wrote:

Hi "Gary's Student",
Many thanks for your help. I pasted your code into the Worksheet (after
right clicking on sheet tab and then 'View Code'). The problem that occurred
is that the format changed to either general or number, and the expected
result of One hour as a Bold and Centred '01:00' appeared as
'0.0416666666666667'. I've tried recording a Macro to change the format to
custom time and then pasting it into your code but my knowledge it too poor
to get it to work. Any help would be appreciated !
Cheers
GrahamB

"Gary''s Student" wrote in message
...
Hi Graham:

Paste the following macro into Worksheet code:

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("A5")) Is Nothing Then
Exit Sub
End If
With Range("A5")
If .HasFormula Then
Exit Sub
End If
.ClearFormats
.Font.FontStyle = "bold"
.Font.ColorIndex = xlAutomatic
End With
End Sub

If you are not familiar with VBA, see:

http://www.mvps.org/dmcritchie/excel/getstarted.htm
--
Gary's Student


"GrahamB" wrote:

Cell A5 contains a formula with that cell unlocked. The formula gives a
prompt to the user who can then either accept the forluma's 'suggestion'
or
overtype that formula with a value. The default font format is Arial 10
with
half scale grey. If the user chooses to overtype that formula, I want the
result to show as bold and black (or automatic). The sheet will then
effectively highlight (in bold) those cells where the formula has been
overtyped. (I don't think it makes a difference but A5 default format is
custom 'hh:mm').
I've tried all types or conditional formatting but cannot get the correct
result !
GrahamB








  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default Conditional Formats for formulae and values

Hi Graham:

Here is the updated code:

Private Sub Worksheet_Change(ByVal Target As Range)
'''''''''''''''''''''''''''''''''''''''''''
'
' version 2
'
''''''''''''''''''''''''''''''''''''''''''''
If Intersect(Target, Range("A5")) Is Nothing Then
Exit Sub
End If
With Range("A5")
If .HasFormula Then
Exit Sub
End If
.Font.FontStyle = "bold"
.Font.ColorIndex = xlAutomatic
End With
End Sub

The only necessary change was to remove the clear formats statement in the
original version.

Have a pleasant day!
--
Gary's Student
gsnu200701


"GrahamB" wrote:

Hi "Gary's Student",
Many thanks for your help. I pasted your code into the Worksheet (after
right clicking on sheet tab and then 'View Code'). The problem that occurred
is that the format changed to either general or number, and the expected
result of One hour as a Bold and Centred '01:00' appeared as
'0.0416666666666667'. I've tried recording a Macro to change the format to
custom time and then pasting it into your code but my knowledge it too poor
to get it to work. Any help would be appreciated !
Cheers
GrahamB

"Gary''s Student" wrote in message
...
Hi Graham:

Paste the following macro into Worksheet code:

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("A5")) Is Nothing Then
Exit Sub
End If
With Range("A5")
If .HasFormula Then
Exit Sub
End If
.ClearFormats
.Font.FontStyle = "bold"
.Font.ColorIndex = xlAutomatic
End With
End Sub

If you are not familiar with VBA, see:

http://www.mvps.org/dmcritchie/excel/getstarted.htm
--
Gary's Student


"GrahamB" wrote:

Cell A5 contains a formula with that cell unlocked. The formula gives a
prompt to the user who can then either accept the forluma's 'suggestion'
or
overtype that formula with a value. The default font format is Arial 10
with
half scale grey. If the user chooses to overtype that formula, I want the
result to show as bold and black (or automatic). The sheet will then
effectively highlight (in bold) those cells where the formula has been
overtyped. (I don't think it makes a difference but A5 default format is
custom 'hh:mm').
I've tried all types or conditional formatting but cannot get the correct
result !
GrahamB






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
Export Conditional Formatting Values dcohen Excel Worksheet Functions 0 October 19th 06 01:50 PM
copying conditional formats (2007 Beta) Bud Excel Worksheet Functions 1 October 5th 06 11:14 PM
Paste Special Formats Generated by Conditional Formatting ExcelMonkey Excel Discussion (Misc queries) 6 May 22nd 06 07:10 PM
How do I insert symbol conditional on cell values Ivan Taklew Excel Discussion (Misc queries) 2 April 27th 06 03:52 PM
Conditional Format Not Working KMH Excel Discussion (Misc queries) 0 December 22nd 05 05:32 PM


All times are GMT +1. The time now is 10:03 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"