Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 88
Default Conditional Format (not color format)

and here i am once again:

i want to format a cell based on the value of another cell:

A1 - is set to 0, 1, 2, etc (0 & 2 represent a dollar amount; 1 represents a
% value)

cell A2 - describes 0 as a fixed dollar amount, 1 describes the value as a
percentage, 2 describes a fixed dollar amount also

the above i'm good at, and i have that part down.

the next part i need help with.

i want cell A3 to automatically format into a percentage or dollar based on
A1's value

if A1=0 or 2 == when i enter 6.25 in A3, i want the cell to show $6.25
if A1=1 == when i enter 6.25 in A3, i want the cell to show 6.25%

i tried conditional format, but all it really allows me to do is color the
cell.

any help will be appreciated.

jatman
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,646
Default Conditional Format (not color format)

You need a Change event sub for this:

Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
If Target.Column = 1 Then
Select Case Target.Row
Case 1
Range("A3").NumberFormat = "General"
Case 3
Range("A3").NumberFormat = IIf(Range("A1") = 1, "0.00%", "$0.00")
End Select
End If
Application.EnableEvents = True
End Sub

Regards,
Stefi

€˛jatman€¯ ezt Ć*rta:

and here i am once again:

i want to format a cell based on the value of another cell:

A1 - is set to 0, 1, 2, etc (0 & 2 represent a dollar amount; 1 represents a
% value)

cell A2 - describes 0 as a fixed dollar amount, 1 describes the value as a
percentage, 2 describes a fixed dollar amount also

the above i'm good at, and i have that part down.

the next part i need help with.

i want cell A3 to automatically format into a percentage or dollar based on
A1's value

if A1=0 or 2 == when i enter 6.25 in A3, i want the cell to show $6.25
if A1=1 == when i enter 6.25 in A3, i want the cell to show 6.25%

i tried conditional format, but all it really allows me to do is color the
cell.

any help will be appreciated.

jatman

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
Is it possible to copy a conditional format formula as paste value Francois via OfficeKB.com Excel Discussion (Misc queries) 2 September 22nd 06 09:40 AM
Conditional Format Isa Excel Discussion (Misc queries) 2 September 15th 06 05:56 PM
Conditional Formating. Remove condition, keep format? Mr. Wing Excel Discussion (Misc queries) 0 September 14th 06 07:15 PM
How to create a conditional format that changes the number format tmbo Excel Discussion (Misc queries) 1 August 23rd 06 06:20 AM
Cell Format Changes When Data Is Entered - Not Conditional Formatt SundanceKidLudwig Excel Worksheet Functions 2 September 30th 05 02:07 PM


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