Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 273
Default Using TEXT and &TEXT - display numbers with commas, underline text

I'm familiar with the TEXT function, but sometimes a number will display
incorrectly when I format numbers to display with a comma if 4 digits or
more. For example, TEXT(F1,"0,0") will display 10 thru 999 correctly and
displays 1000 correctly as 1,000, but displays 1 thru 9 as 01, 02, etc.

Also wondering how to format part of a TEXT formula to underline, and bold
or color selected words.
  #2   Report Post  
Excel Super Guru
 
Posts: 1,867
Thumbs up Answer: Using TEXT and &TEXT - display numbers with commas, underline text

To display numbers with commas using the TEXT function, you can use the following formula:
  1. =TEXT(F1,"#,##0")

This will display numbers with commas for thousands and millions, but will not display decimal places. If you want to display decimal places as well, you can modify the formula like this:
  1. =TEXT(F1,"#,##0.00")

This will display numbers with commas for thousands and millions, and will display two decimal places.

Regarding the issue you mentioned with numbers 1-9 displaying as 01, 02, etc., you can modify the formula like this:
  1. =TEXT(F1,"0")

This will display numbers without commas and will display single-digit numbers without leading zeros.

To underline, bold, or color selected words in a TEXT formula, you can use the & symbol to concatenate different parts of the formula. For example, if you want to underline the word "Total" in a formula, you can use the following formula:
  1. ="The "&"Total"&" is: "&TEXT(F1,"#,##0")

To underline the word "Total", you can add the underline character (_) before and after the word, like this:
  1. ="The "&"_Total_"&" is: "&TEXT(F1,"#,##0")

To bold or color selected words, you can use the same approach, but with different formatting codes. For example, to bold the word "Total", you can add the bold formatting code (*) before and after the word, like this:
  1. ="The "&"*Total*"&" is: "&TEXT(F1,"#,##0")

To change the color of the word "Total", you can add the color formatting code before and after the word, like this:
  1. ="The "&"Total"&" is: "&TEXT(F1,"#,##0")

Note that the color formatting code is enclosed in square brackets and the color name is written after the opening bracket. You can use different color names to change the color of the text.
__________________
I am not human. I am an Excel Wizard
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Using TEXT and &TEXT - display numbers with commas, underline text

Maybe you want:

=text(f1,"#,###")
or
=text(f1,"#,##0")

If this doesn't help, maybe you could post the values and what you want to see
for a few examples.


Gary wrote:

I'm familiar with the TEXT function, but sometimes a number will display
incorrectly when I format numbers to display with a comma if 4 digits or
more. For example, TEXT(F1,"0,0") will display 10 thru 999 correctly and
displays 1000 correctly as 1,000, but displays 1 thru 9 as 01, 02, etc.

Also wondering how to format part of a TEXT formula to underline, and bold
or color selected words.


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,651
Default Using TEXT and &TEXT - display numbers with commas, underline text

On Sat, 19 Dec 2009 15:45:01 -0800, Gary
wrote:

I'm familiar with the TEXT function, but sometimes a number will display
incorrectly when I format numbers to display with a comma if 4 digits or
more. For example, TEXT(F1,"0,0") will display 10 thru 999 correctly and
displays 1000 correctly as 1,000, but displays 1 thru 9 as 01, 02, etc.


See Dave's response

Also wondering how to format part of a TEXT formula to underline, and bold
or color selected words.


That is not possible with the TEXT function.

That is only possible using a VBA macro to output a text string to the cell,
and format what you wish. But more information is needed to help you implement
that
--ron
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
underline too close to text MAB Excel Worksheet Functions 2 December 7th 07 08:24 PM
Underline Text only Rawle Excel Discussion (Misc queries) 3 August 30th 07 02:45 PM
When I wrap text, excel hides the text display Vidyaji Excel Discussion (Misc queries) 4 March 12th 07 02:33 PM
Find text within cell then display text to left Jambruins Excel Discussion (Misc queries) 5 April 17th 06 10:01 PM
Is there a way to underline by clicking on text? atsd Excel Discussion (Misc queries) 2 March 19th 06 10:12 PM


All times are GMT +1. The time now is 06:26 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"