![]() |
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 |
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 |
All times are GMT +1. The time now is 08:21 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com