Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 13
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,624
Default 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
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
Conditional Formating markythesk8erboi Excel Worksheet Functions 2 September 24th 07 11:02 PM
Conditional formating Dave Excel Worksheet Functions 2 June 18th 07 02:51 PM
conditional formating Paul Excel Discussion (Misc queries) 1 September 21st 06 09:28 PM
Install dates formating using conditional formating? Jerry Eggleston Excel Discussion (Misc queries) 2 November 9th 05 05:49 PM
conditional formating Steiner Excel Discussion (Misc queries) 1 August 18th 05 01:28 AM


All times are GMT +1. The time now is 04:56 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"