Number Formatting using a Formula?

Karthik-Excelsior

Active Member
Joined
Mar 4, 2011
Messages
313
Hi Excel experts,

Apart from cell formatting, is there a way to format a number using a formula?

For eg. I have a sentence which runs like this:

"The sales on these items have yielded $65.7M in cash"

It's actually a concatenation of text and formula like this:

="The sales on these items have yielded $"&SUM(B:B)&" in cash"

But, when the formula sums up the sales fig, it shows like this:

"The sales on these items have yielded $65684234 in cash"

Is there a way we can format the number in this sentence to be represented as "$65.7M"?

Any help here is much appreciated!

Thanks,

Karthik
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Hi Karthik

Try:

="The sales on these items have yielded "&TEXT(SUM(B:B),"$0.0,,\M")&" in cash"
 
Upvote 0

Forum statistics

Threads
1,207,436
Messages
6,078,542
Members
446,345
Latest member
MicCh

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top