Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default How to create a conditional format that changes the number format


Hi

I am wondering if it is possible to change the number format of a
column of values depending on a cell that says true or false.

I would like to be able to specify it like a conditional fromat.

I know you can do something in custom number format but as far as I
know this will only evaluate the condition on the current cell value.

Any help would be most appreciated.


--
tmbo
------------------------------------------------------------------------
tmbo's Profile: http://www.excelforum.com/member.php...o&userid=37214
View this thread: http://www.excelforum.com/showthread...hreadid=574469

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 179
Default How to create a conditional format that changes the number format

write small code in a particular worksheet module:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$D$10" And Target.Value = 20 Then
Target.NumberFormat = "00.00"
Else
Target.NumberFormat = "00"
End If
End Sub

'Target.Address = "$D$10" And Target.Value = 20 - example cell address $D$10
and value 10
'example format: Target.NumberFormat = "00.00"


"tmbo" wrote:


Hi

I am wondering if it is possible to change the number format of a
column of values depending on a cell that says true or false.

I would like to be able to specify it like a conditional fromat.

I know you can do something in custom number format but as far as I
know this will only evaluate the condition on the current cell value.

Any help would be most appreciated.


--
tmbo
------------------------------------------------------------------------
tmbo's Profile: http://www.excelforum.com/member.php...o&userid=37214
View this thread: http://www.excelforum.com/showthread...hreadid=574469


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
" / " Changing Decimal number format to Fraction on Protected Cell laudie Excel Worksheet Functions 0 November 15th 05 02:13 AM
how to create conditional format linked to date nicko68 Excel Discussion (Misc queries) 2 September 29th 05 08:08 PM
Conditional format of minimum number MaggieMagill Excel Worksheet Functions 6 September 25th 05 11:36 PM
How do I create a number format mm:ss:th (tenths and hundreths) mrose5 Excel Worksheet Functions 1 September 24th 05 11:13 PM
how do I create conditional format pwolffie Excel Discussion (Misc queries) 2 February 17th 05 08:49 PM


All times are GMT +1. The time now is 01:13 PM.

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"