How to I format a number to text?

gkisystems

Board Regular
Joined
Apr 20, 2012
Messages
76
I need to format my product item codes (SKU's) as text for my vlookup to work. Some SKU's are strictly whole numbers, some are numbers with decimal points, and some are numbers and letters.

For example, I have a list of several hundred SKU's that look like this:

4116325488</SPAN>

<TBODY>
</TBODY><COLGROUP><COL></COLGROUP>
CL.272</SPAN>

<TBODY>
</TBODY><COLGROUP><COL></COLGROUP>
FV.3715LB</SPAN>

<TBODY>
</TBODY><COLGROUP><COL></COLGROUP>
G4611.21</SPAN>

<TBODY>
</TBODY><COLGROUP><COL></COLGROUP>
L37646-LBV</SPAN>

<TBODY>
</TBODY><COLGROUP><COL></COLGROUP>
CDA911.P134</SPAN>

<TBODY>
</TBODY><COLGROUP><COL></COLGROUP>
4116325488.01</SPAN>

<TBODY>
</TBODY><COLGROUP><COL></COLGROUP>

I tried using =TEXT(cell_number_here,"#.##") and the formula works fine except for whole number SKU's without a decimal point such as 4116325488. For that SKU, the format results in:

4116325488.

with the period at the end of the number. What formula would work so I do not get the period at the end of the whole number SKU's?
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
I need to format my product item codes (SKU's) as text for my vlookup to work. Some SKU's are strictly whole numbers, some are numbers with decimal points, and some are numbers and letters.

For example, I have a list of several hundred SKU's that look like this:

4116325488</SPAN>

<TBODY>
</TBODY>
CL.272</SPAN>

<TBODY>
</TBODY>
FV.3715LB</SPAN>

<TBODY>
</TBODY>
G4611.21</SPAN>

<TBODY>
</TBODY>
L37646-LBV</SPAN>

<TBODY>
</TBODY>
CDA911.P134</SPAN>

<TBODY>
</TBODY>
4116325488.01</SPAN>

<TBODY>
</TBODY>

I tried using =TEXT(cell_number_here,"#.##") and the formula works fine except for whole number SKU's without a decimal point such as 4116325488. For that SKU, the format results in:

4116325488.

with the period at the end of the number. What formula would work so I do not get the period at the end of the whole number SKU's?
You can convert numeric numbers to TEXT numbers like this:

A1 = 12345

=A1&""
 
Upvote 0

Forum statistics

Threads
1,215,842
Messages
6,127,225
Members
449,371
Latest member
strawberrish

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