Format the same cell with two different formats.

GeorgeCunn

New Member
Joined
Jun 21, 2017
Messages
10
The first number in the cell should be a number (without decimals and the second number should be currency including the cents. An example of what I am trying to achieve is: 5,000 $15.00. The entry in the cell would be 5000 followed by a space and then 15.

I tried formatting in Custom Format with: ##,#0 &" " $#,##0 This didn't work. Any suggestions?

Thank you.
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
A cell can have only one number format. To do what you are trying to do, the entries would have to be text and be concatenated.
Example
Discussions.xlsm
ABCDE
1
25000$15.00 5000 $15
3
4
Sheet1
Cell Formulas
RangeFormula
D2D2=A2&" "&"$" &B2
 
Upvote 0
got to say try and push it to two columns
 
Upvote 0
The first number in the cell should be a number (without decimals and the second number should be currency including the cents. An example of what I am trying to achieve is: 5,000 $15.00. The entry in the cell would be 5000 followed by a space and then 15.

More importantly, a cell can have only one numeric value. And numeric formats work only for numeric values.

On the contrary, what you describe is a text value. To demonstrate, confirm that =ISTEXT(A1) returns TRUE, if A1 is the cell with the data "5000 15".

AFAIK, there is no text format option to change the appearance of text values.

You would need to enter a formula in another cell. For example:


Book1
AB
15000 155,000 $15.00
Sheet1


The formula in B1 is:

=TEXT(LEFT(A1, FIND(" ",A1)-1), "#,##0 ") & TEXT(MID(A1, FIND(" ",A1)+1, 99), "$#,##0.00")

That presumes that the form of the text in A1 is exactly as you stated, specifically: there is only one normal space between two strings that Excel would recognize as a number.

PS.... IMHO, it is a bad idea to have two "numbers" (text) in one cell. Consider using the Text To Column feature to separate a column of such data into two separate columns.
 
Upvote 0

Forum statistics

Threads
1,214,590
Messages
6,120,421
Members
448,961
Latest member
nzskater

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