Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
Is it possible in Excel to conditionally format a Number type in a cell
based on another cell? Example A1 is a dropdown with "Variance $" and "Variance %" And in A2 I have an IF statement that that will give a result from two other cells. What I want A2 to show is either $#.## or ##% depending on what I have in the drop down. Any help would be great. Thanks Tyson |
#2
![]() |
|||
|
|||
![]()
On 27 Jun 2005 12:36:59 -0700, "Tyson" wrote:
Is it possible in Excel to conditionally format a Number type in a cell based on another cell? Example A1 is a dropdown with "Variance $" and "Variance %" And in A2 I have an IF statement that that will give a result from two other cells. What I want A2 to show is either $#.## or ##% depending on what I have in the drop down. Any help would be great. Thanks Tyson In order to actually FORMAT the cell, you would have to either guarantee non-overlapping values for $ vs %, which you could then test, or use a VBA event-triggered macro. To have it display the way you want, a simple formula can do that; but the result is a text string and may not be useable by some functions, directly. =IF(A1="Variance %", TEXT(your_formula,"0.00%"),TEXT(your_formula,"$0.0 0")) If this is not satisfactory, post back and we'll derive a VBA solution. --ron |
#3
![]() |
|||
|
|||
![]() Ron Rosenfeld wrote: On 27 Jun 2005 12:36:59 -0700, "Tyson" wrote: Is it possible in Excel to conditionally format a Number type in a cell based on another cell? Example A1 is a dropdown with "Variance $" and "Variance %" And in A2 I have an IF statement that that will give a result from two other cells. What I want A2 to show is either $#.## or ##% depending on what I have in the drop down. Any help would be great. Thanks Tyson In order to actually FORMAT the cell, you would have to either guarantee non-overlapping values for $ vs %, which you could then test, or use a VBA event-triggered macro. To have it display the way you want, a simple formula can do that; but the result is a text string and may not be useable by some functions, directly. =IF(A1="Variance %", TEXT(your_formula,"0.00%"),TEXT(your_formula,"$0.0 0")) If this is not satisfactory, post back and we'll derive a VBA solution. --ron Perfect! Thanks Ron. Tyson |
#4
![]() |
|||
|
|||
![]()
On 27 Jun 2005 13:31:04 -0700, "Tyson" wrote:
=IF(A1="Variance %", TEXT(your_formula,"0.00%"),TEXT(your_formula,"$0.0 0")) If this is not satisfactory, post back and we'll derive a VBA solution. --ron Perfect! Thanks Ron. Tyson You're welcome. Glad to help. Thanks for the feedback. --ron |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Keep conditional format when "show pages" from Pivot table | Excel Discussion (Misc queries) | |||
How do I do a conditional format for numbers | Excel Worksheet Functions | |||
Office2000: Conditional format behaves strangely | Excel Discussion (Misc queries) | |||
copy conditional format as ACTUAL format | Excel Discussion (Misc queries) | |||
Copying a conditional format | Excel Worksheet Functions |