View Single Post
  #7   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 06:23:18 -0700 (PDT), Seemore
wrote:

The string that i used is ="If you pay $Sheet3!$J$5&" over 15 years,
you will have paid a total of $"&Sheet3!L18&"." The first cell
gives me 2 decimals and the second gives me 9. I would prefer whole
numbers instead. I appreciate the help and will also seek the help of
the other group you mentioned.


You have to do the formatting within the text statement.

You probably want something like:

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

The above formatting assumed you wanted zero decimal places, $ formatting
(select your own currency symbol if '$' is not appropriate), and that there was
nothing special to do about negative values.
--ron