ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Conditional Number formatting? (https://www.excelbanter.com/excel-discussion-misc-queries/49200-conditional-number-formatting.html)

Scott Dawson

Conditional Number formatting?
 
Hello,

I am curious to know if it is possible to use the conditional formatting to
change the number formatting?

Currently, I have a sheet that is printed and mailed, but also does
calculations.

I would like to have the numbers in the calculation change between the
number formatting of €œ$###,###,##0€and €œ### ### ##0 $€ depending on what is
selected in a certain cell.

I tried, If(A1=€Option 1€,text(A2, €œ### ### ##0 $€),text(Text,A2,
€œ$###,###,##0€) but the number became text and and dependants on A2 would not
work. Give the number of cells that I would need to apply this to I was
hoping for something more global in nature.

Any suggestions would be greatly appreciated.

Thanks,
Scott

bj

conditionaL formating will not change the number format.
You would need a macro to do this

"Scott Dawson" wrote:

Hello,

I am curious to know if it is possible to use the conditional formatting to
change the number formatting?

Currently, I have a sheet that is printed and mailed, but also does
calculations.

I would like to have the numbers in the calculation change between the
number formatting of €œ$###,###,##0€and €œ### ### ##0 $€ depending on what is
selected in a certain cell.

I tried, If(A1=€Option 1€,text(A2, €œ### ### ##0 $€),text(Text,A2,
€œ$###,###,##0€) but the number became text and and dependants on A2 would not
work. Give the number of cells that I would need to apply this to I was
hoping for something more global in nature.

Any suggestions would be greatly appreciated.

Thanks,
Scott


Earl Kiosterud

Scott,

I was with you until you said "depending on what is selected in a certain
cell." Do you mean "selected" or "contained?" Anyway, Conditional
Formatting doesn't change number formatting. There are custom formatting
codes that can change number formatting, but only as a function of the
contents of the cell itself, not another cell. Probably a macro is the only
way.
--
Earl Kiosterud
www.smokeylake.

"Scott Dawson" <Scott wrote in message
...
Hello,

I am curious to know if it is possible to use the conditional formatting
to
change the number formatting?

Currently, I have a sheet that is printed and mailed, but also does
calculations.

I would like to have the numbers in the calculation change between the
number formatting of "$###,###,##0"and "### ### ##0 $" depending on what
is
selected in a certain cell.

I tried, If(A1="Option 1",text(A2, "### ### ##0 $"),text(Text,A2,
"$###,###,##0") but the number became text and and dependants on A2 would
not
work. Give the number of cells that I would need to apply this to I was
hoping for something more global in nature.

Any suggestions would be greatly appreciated.

Thanks,
Scott




Scott Dawson

Thanks Earl.
A macro is what I thought I might have to use, but was hoping there might be
formula. I appreciate the advice.

"Earl Kiosterud" wrote:

Scott,

I was with you until you said "depending on what is selected in a certain
cell." Do you mean "selected" or "contained?" Anyway, Conditional
Formatting doesn't change number formatting. There are custom formatting
codes that can change number formatting, but only as a function of the
contents of the cell itself, not another cell. Probably a macro is the only
way.
--
Earl Kiosterud
www.smokeylake.

"Scott Dawson" <Scott wrote in message
...
Hello,

I am curious to know if it is possible to use the conditional formatting
to
change the number formatting?

Currently, I have a sheet that is printed and mailed, but also does
calculations.

I would like to have the numbers in the calculation change between the
number formatting of "$###,###,##0"and "### ### ##0 $" depending on what
is
selected in a certain cell.

I tried, If(A1="Option 1",text(A2, "### ### ##0 $"),text(Text,A2,
"$###,###,##0") but the number became text and and dependants on A2 would
not
work. Give the number of cells that I would need to apply this to I was
hoping for something more global in nature.

Any suggestions would be greatly appreciated.

Thanks,
Scott





Scott Dawson

Thanks for the reply. I am working on the macro now.


"bj" wrote:

conditionaL formating will not change the number format.
You would need a macro to do this

"Scott Dawson" wrote:

Hello,

I am curious to know if it is possible to use the conditional formatting to
change the number formatting?

Currently, I have a sheet that is printed and mailed, but also does
calculations.

I would like to have the numbers in the calculation change between the
number formatting of €œ$###,###,##0€and €œ### ### ##0 $€ depending on what is
selected in a certain cell.

I tried, If(A1=€Option 1€,text(A2, €œ### ### ##0 $€),text(Text,A2,
€œ$###,###,##0€) but the number became text and and dependants on A2 would not
work. Give the number of cells that I would need to apply this to I was
hoping for something more global in nature.

Any suggestions would be greatly appreciated.

Thanks,
Scott


neda5

Conditional Number formatting?
 
Scott,
I am having the same problem and was wondering if you can share with me how
yuo solved it.
Thanks in advance.
Neda

"Scott Dawson" wrote:

Hello,

I am curious to know if it is possible to use the conditional formatting to
change the number formatting?

Currently, I have a sheet that is printed and mailed, but also does
calculations.

I would like to have the numbers in the calculation change between the
number formatting of €œ$###,###,##0€and €œ### ### ##0 $€ depending on what is
selected in a certain cell.

I tried, If(A1=€Option 1€,text(A2, €œ### ### ##0 $€),text(Text,A2,
€œ$###,###,##0€) but the number became text and and dependants on A2 would not
work. Give the number of cells that I would need to apply this to I was
hoping for something more global in nature.

Any suggestions would be greatly appreciated.

Thanks,
Scott



All times are GMT +1. The time now is 04:49 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com