Copy literal data to cell intact

tdp3290

Board Regular
Joined
Feb 15, 2007
Messages
58
Hi,

Newbie question. How can I copy the literal value of a cell to another cell. I have numbers in a cell that have a decimnal like:
17.5
20.0
15.0
10.0
12.5

but the even numbers only get copied to a new cell without the decimals..

Like:
17.5
20
15
10
12.5

I need them to remain intact when they are copied. BTW. THese are being appended onto a string of characters into another cell. So if I put:

=A2 & B2 where A2 is the word "Computer" and B2 is the number 20.0 the formated cell returns Computer20 but I need it to return Computer20.0 with the decimal intact.
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
You can take care of that when you append by using the TEXT() formula to create the proper format for your text string with the number:
=A2&TEXT(B2,"0.0")

That is probably the best solution. You can of course display the decimals in A2 by using a number format other than "General". The text format string ("0.0") tells Exel the 1 digit and the 1/10 digit are required and should show zero if not otherwise present.

Example:
A2 = "Computer"
B2 = 20
=A2&TEXT(B2,"0.0") ==> results is Computer20.0
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,375
Messages
6,124,578
Members
449,174
Latest member
chandan4057

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