Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Export Conditional Formatting Values | Excel Worksheet Functions | |||
copying conditional formats (2007 Beta) | Excel Worksheet Functions | |||
Paste Special Formats Generated by Conditional Formatting | Excel Discussion (Misc queries) | |||
How do I insert symbol conditional on cell values | Excel Discussion (Misc queries) | |||
Conditional Format Not Working | Excel Discussion (Misc queries) |