Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Conditional Formatting
You could use sheet event code.
Private Sub Worksheet_Change(ByVal Target As Excel.Range) Dim cell As Range For each cell in Me.Range("A1:A100") 'adjust to suit If Application.IsNumber(cell.Value) Then Select Case Right(cell.Value, 1) Case 1 cell.NumberFormat = "##""st""" Case 2 cell.NumberFormat = "##""nd""" Case 3 cell.NumberFormat = "##""rd""" Case Else cell.NumberFormat = "##""th""" End Select End If Next cell End Sub Right-click on the sheet tab and "View Code". Copy/paste the code into that module. Edit the range if need be then Alt + q to return to the Excel window. Gord Dibben MS Excel MVP On Wed, 31 Dec 2008 17:15:01 -0800, Jokah.D wrote: I would like to represent numbers as placements for example: 421 becomes 421st with the "st" in superscript, 32 becomes 32nd with the "nd" in superscript. Is there a way to do this in Excel 2007? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Formatting cells in a column with conditional formatting? | Excel Discussion (Misc queries) | |||
Protect Cell Formatting including Conditional Formatting | Excel Discussion (Misc queries) | |||
conditional Formatting based on cell formatting | Excel Worksheet Functions | |||
conditional Formatting based on cell formatting | Excel Worksheet Functions | |||
Conditional Formatting that will display conditional data | Excel Worksheet Functions |