Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Why can't Conditional Formatting do other formating such as number

I want to set the number of decimal places for a cell based on a condition in
another cell. You cna't do that in conditional formatting. Is there another
way?

----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/comm...et.f unctions
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,441
Default Why can't Conditional Formatting do other formating such as number

Gene,

To show the number from cell A1 in another cell with as conditional number of decimal places, use a
formula like

=TEXT(A1,"0." & REPT("0",some conditional formula that returns a number)

like:

=TEXT(A1,"0."&REPT("0",IF(A1100,2,3)))

But then it isn't a number - some functions will treat it as a number ( using +, for example) while
others (SUM()) will not...

HTH,
Bernie
MS Excel MVP


"Gene Herron" <Gene wrote in message
...
I want to set the number of decimal places for a cell based on a condition in
another cell. You cna't do that in conditional formatting. Is there another
way?

----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/comm...et.f unctions


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Why can't Conditional Formatting do other formating such as nu

Thank you for your reply, but what I'm trying to do is change the formatting
of the cell if a condition is met in another cell. So that if 37 is entered
in the cell if the condition is met it displays 37.0, but if it is not met it
displays 37. If you write a formula in a cell, when you enter 37 in the cell
the formula is erased.

Gene

"Bernie Deitrick" wrote:

Gene,

To show the number from cell A1 in another cell with as conditional number of decimal places, use a
formula like

=TEXT(A1,"0." & REPT("0",some conditional formula that returns a number)

like:

=TEXT(A1,"0."&REPT("0",IF(A1100,2,3)))

But then it isn't a number - some functions will treat it as a number ( using +, for example) while
others (SUM()) will not...

HTH,
Bernie
MS Excel MVP


"Gene Herron" <Gene wrote in message
...
I want to set the number of decimal places for a cell based on a condition in
another cell. You cna't do that in conditional formatting. Is there another
way?

----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/comm...et.f unctions



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,441
Default Why can't Conditional Formatting do other formating such as nu

Gene,

You could use an event: copy this code, right-click the sheet tab, select "View Code" and paste the
code into the window that appears. This example will format cell B1 with the number of decimals
that is given in cell D3. This would also require that the sheet have some formulas that would
force the calculate event.

Private Sub Worksheet_Calculate()
Range("B1").NumberFormat = "0." & Application.Rept("0", Range("D3").Value)
End Sub

HTH,
Bernie
MS Excel MVP


"Gene Herron" wrote in message
...
Thank you for your reply, but what I'm trying to do is change the formatting
of the cell if a condition is met in another cell. So that if 37 is entered
in the cell if the condition is met it displays 37.0, but if it is not met it
displays 37. If you write a formula in a cell, when you enter 37 in the cell
the formula is erased.

Gene

"Bernie Deitrick" wrote:

Gene,

To show the number from cell A1 in another cell with as conditional number of decimal places, use
a
formula like

=TEXT(A1,"0." & REPT("0",some conditional formula that returns a number)

like:

=TEXT(A1,"0."&REPT("0",IF(A1100,2,3)))

But then it isn't a number - some functions will treat it as a number ( using +, for example)
while
others (SUM()) will not...

HTH,
Bernie
MS Excel MVP


"Gene Herron" <Gene wrote in message
...
I want to set the number of decimal places for a cell based on a condition in
another cell. You cna't do that in conditional formatting. Is there another
way?

----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/comm...et.f unctions





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
conditional formatting glitches Kat Excel Discussion (Misc queries) 2 May 26th 06 08:16 PM
Conditional Formatting when inserting a row zahoulik Excel Worksheet Functions 2 January 7th 06 03:01 PM
Conditional Number formatting? Scott Dawson Excel Discussion (Misc queries) 5 December 20th 05 12:46 AM
odd and even number conditional formatting vishu Excel Discussion (Misc queries) 3 October 18th 05 09:00 AM
Conditional Formatting sweetsue516 Excel Discussion (Misc queries) 7 September 20th 05 08:16 PM


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