ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Currency Format within a Concatenation (https://www.excelbanter.com/excel-programming/388925-currency-format-within-concatenation.html)

[email protected]

Currency Format within a Concatenation
 
Hello,

How can I change the format of a variable to currency within a
concatenation?

For example, suppose I have

cells(1,1).value="The total is " & s

but I want s to be formatted as currency.

Thanks.


JE McGimpsey

Currency Format within a Concatenation
 
One way:

Cells(1, 1).Value = "The total is " & Format(s, "£0.00")

In article .com,
wrote:

Hello,

How can I change the format of a variable to currency within a
concatenation?

For example, suppose I have

cells(1,1).value="The total is " & s

but I want s to be formatted as currency.

Thanks.


Niek Otten

Currency Format within a Concatenation
 
cells(1,1).value="The total is " & Format (s,"$0.00")

Or a more comprehensive format code of your choice

--
Kind regards,

Niek Otten
Microsoft MVP - Excel


wrote in message oups.com...
| Hello,
|
| How can I change the format of a variable to currency within a
| concatenation?
|
| For example, suppose I have
|
| cells(1,1).value="The total is " & s
|
| but I want s to be formatted as currency.
|
| Thanks.
|



strive4peace

Currency Format within a Concatenation
 
Hi Quinn,

try

cells(1,1) = "The total is " & format(s, "$#,##0.00")


Warm Regards,
Crystal
*
(: have an awesome day :)
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*



wrote:
Hello,

How can I change the format of a variable to currency within a
concatenation?

For example, suppose I have

cells(1,1).value="The total is " & s

but I want s to be formatted as currency.

Thanks.


strive4peace

Currency Format within a Concatenation
 
p.s.

I think you can also do this:

cells(1,1) = "The total is " & format(s, "currency")

Warm Regards,
Crystal
*
(: have an awesome day :)
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*



strive4peace wrote:
Hi Quinn,

try

cells(1,1) = "The total is " & format(s, "$#,##0.00")


Warm Regards,
Crystal
*
(: have an awesome day :)
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*



wrote:
Hello,

How can I change the format of a variable to currency within a
concatenation?

For example, suppose I have

cells(1,1).value="The total is " & s

but I want s to be formatted as currency.

Thanks.



All times are GMT +1. The time now is 11:29 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com