Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Tyson
 
Posts: n/a
Default Conditional Format for Numbers

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   Report Post  
Ron Rosenfeld
 
Posts: n/a
Default

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   Report Post  
Tyson
 
Posts: n/a
Default



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   Report Post  
Ron Rosenfeld
 
Posts: n/a
Default

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
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
Keep conditional format when "show pages" from Pivot table Angus Excel Discussion (Misc queries) 7 June 30th 05 01:33 PM
How do I do a conditional format for numbers bowada Excel Worksheet Functions 2 June 6th 05 05:10 PM
Office2000: Conditional format behaves strangely Arvi Laanemets Excel Discussion (Misc queries) 1 April 7th 05 08:47 AM
copy conditional format as ACTUAL format Dana Zulager Excel Discussion (Misc queries) 7 December 7th 04 11:02 PM
Copying a conditional format Meaux Excel Worksheet Functions 2 November 29th 04 10:19 AM


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