Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Conditional Formating
I need to create a format based on a user condition. Example if the person
choose % on a cell the next cell in the following column should be formated at % if the person chooses number then the next cell in the following column should be formated as a whole number. Any idea how to make this happen? |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Conditional Formating
I don't think you'll be able to use format|Conditional formatting for this.
But maybe you could use data|validation to provide a list of options for the formatting. Then use a worksheet_Change event that applies the formatting you want to the cell(s) that you want. If you need help, you should provide the list of formatting options. The range that should have its formatting changed and the version of excel that you're using. jk9533 wrote: I need to create a format based on a user condition. Example if the person choose % on a cell the next cell in the following column should be formated at % if the person chooses number then the next cell in the following column should be formated as a whole number. Any idea how to make this happen? -- Dave Peterson |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Conditional Formating
You can't use Conditional Formatting to change number format.
You could use an Event macro. For instance, if the "format" cell is A1 and the "number" cell is B1, put this in your worksheet code module (right-click the worksheet tab and choose View Code): Private Sub Worksheet_Change(ByVal Target As Excel.Range) With Target If Not Intersect(.Cells, Range("A1")) Is Nothing Then If Trim(.Text) = "%" Then .Offset(0, 1).NumberFormat = "0%" Else .Offset(0, 1).NumberFormat = "0" End If End If End With End Sub In article , jk9533 wrote: I need to create a format based on a user condition. Example if the person choose % on a cell the next cell in the following column should be formated at % if the person chooses number then the next cell in the following column should be formated as a whole number. Any idea how to make this happen? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Conditional Formating | Excel Worksheet Functions | |||
Conditional formating | Excel Worksheet Functions | |||
conditional formating | Excel Discussion (Misc queries) | |||
Install dates formating using conditional formating? | Excel Discussion (Misc queries) | |||
conditional formating | Excel Discussion (Misc queries) |