Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Format a number to display as alternative text

Hello All

I am trying to format a set of cells, A1:A4 that have the following values.
A1=1; A2=2; A3=3; A4=4
I however want the displayed information to show up as "Very Low", "Low",
"High" and "Very High"

If I just type the text in, I cannot find a way to sort them in the
numerical order I like because it sorts alphabetically, so I have to put them
in as numbers to get the sort working. Is there anyway I can have them
display as text or can I leave them as text and build a custom sort list so
that they will sort in the order as above.

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,298
Default Format a number to display as alternative text

you can't do it this way. What you could do is have the cell next to the
number show a text value.

With number formats yuo can only have 3 textual items, buts thats really
awful and Excel will translate if it can, so High will become Hours
You could use an IF or a UDF
eg in B1 to B4 =IF(A1=4,"Very High",IF(A1="3","High".....etc
you also us a UDF which would make the formula clearer

=UDF_Format(A1)

Function UDF_Format(target As Range) As String
Select Case target.Value
Case 4
UDF_Format = "Very High"
Case 3
UDF_Format = "High"
Case 2
UDF_Format = "Low"
Case 1
UDF_Format = "Very Low"
Case Else
UDF_Format = ""
End Select
End Function



Function MyFormat(target as range) as string

eg


"Terrafutan" wrote:

Hello All

I am trying to format a set of cells, A1:A4 that have the following values.
A1=1; A2=2; A3=3; A4=4
I however want the displayed information to show up as "Very Low", "Low",
"High" and "Very High"

If I just type the text in, I cannot find a way to sort them in the
numerical order I like because it sorts alphabetically, so I have to put them
in as numbers to get the sort working. Is there anyway I can have them
display as text or can I leave them as text and build a custom sort list so
that they will sort in the order as above.

Thanks

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
Display the number in the Indian format bala Excel Discussion (Misc queries) 5 October 18th 08 05:02 PM
To display number in text format in cells Man T New Users to Excel 7 July 1st 08 12:35 PM
Custom number display format bEar Excel Worksheet Functions 4 May 16th 08 01:42 AM
Format number to display % symbol smaller than onther text in cell [email protected] Excel Discussion (Misc queries) 1 October 11th 06 12:31 AM
Number format need to display 0001 etc Carys Excel Discussion (Misc queries) 4 July 27th 06 07:22 PM


All times are GMT +1. The time now is 12:35 PM.

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

About Us

"It's about Microsoft Excel"