Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Is it possible to copy a conditional format formula as paste value | Excel Discussion (Misc queries) | |||
Conditional Format | Excel Discussion (Misc queries) | |||
Conditional Formating. Remove condition, keep format? | Excel Discussion (Misc queries) | |||
How to create a conditional format that changes the number format | Excel Discussion (Misc queries) | |||
Cell Format Changes When Data Is Entered - Not Conditional Formatt | Excel Worksheet Functions |