CONCATENATE or TEXT function to retain specific # formating

TDC21

Board Regular
Joined
Mar 31, 2017
Messages
97
Hello all,

I am trying to combine 2 cells to create a generic ID but I am having trouble finding the correct formula to retain the appropriate formatting.

Cell D2 = 0.2500
Cell E2 = SA516-70

The desired result is 0.2500_SA516-70

I have tried =TEXT(D3,"#.####")&"_"&E3 as well as =CONCATENATE(D3,"_",E3) but neither retains the number formatting for cell D2

Any suggestions would be greatly appreciated
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Hello,

Have you considered having D2 cell converted into a text format cell which will retain the 0.2500 as inputted.

If D2 is converted to a Number formatted cell you will loose the 00 at the end.

=CONCATENATE(D2,"_",E2)

I am working on Microsoft 365 for Mac and this works with the above solution.
 
Upvote 0
You always have i simpler way to do things. I am learning alot here
By way of explanation... the second argument to the TEXT function is a text constant where some characters have special meaning to the function. Basically, the TEXT function substitutes parts of values from the first argument for those characters having special meaning, any other text is left as is and remains untouched. If you want a character that has special meaning to the TEXT function to not have that special meaning, you can place a backslash in front of that character to take its special meaning, the TEXT function will then treat it as just a plain character and display it as is.
 
Upvote 0
Oh okay. Thanks for the info. I am now enjoying the power of excel. One day i will also be solving problem for others!
 
Upvote 0
Oh okay. Thanks for the info. I am now enjoying the power of excel. One day i will also be solving problem for others!

There is no time like the present! In my experience, helping others has been a great way to learn new tricks and build on prior knowledge/skills.
 
Upvote 0

Forum statistics

Threads
1,216,027
Messages
6,128,381
Members
449,445
Latest member
JJFabEngineering

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