View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.programming
Ron Rosenfeld Ron Rosenfeld is offline
external usenet poster
 
Posts: 5,651
Default adding a cell in a text string

On Tue, 11 Aug 2009 08:50:50 -0700 (PDT), Seemore
wrote:

That worked perfectly. In the future, if I decide I want decimals how
would I change it? Again, many thanks. These forums have saved me a
lot of headaches.


Take a look at HELP for the TEXT worksheet function and also for "Number Format
Codes".

The format code you would use in the TEXT function is the same code you would
use if you custom formatted a cell (Format/Cells/Number/Custom Type: )

However, I used a little trick to put in the terminal ".", so it may not be
clear to you.

To redo the sentence to allow, for example, two decimals:

="If you pay "&TEXT(Sheet3!$J$5,"$#,##0.00")
&" over 15 years, you will have paid a total of "&
TEXT(Sheet3!L18,"$#,##0.00\.")

--ron