netpancho

New Member
Joined
Apr 2, 2024
Messages
2
Office Version
  1. 365
Platform
  1. Windows
I have the following text in Excel 17661TJBA020Y1 and would like to use a custom cell format to show this way:
17666-TJB-A020-Y1

I do not want to use a formula, just the custom format in place

in advance, thanks.
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Excel unfortunately does not support custom formats for text values. You would need a Macro or a Formula to achieve this.
 
Upvote 0
If it follows a certain pattern, you could use VBA to either:
1. Automatically change the values as they are entered into the cells (i.e. automatically insert the "-" wherever needed)
- or -
2. Run against a certain range of values already entered in and insert the "-" wherever needed

If you want to do either of those things, please provide us with the details needed (i.e. ranges and rules).
 
Upvote 0
If it follows a certain pattern, you could use VBA to either:
1. Automatically change the values as they are entered into the cells (i.e. automatically insert the "-" wherever needed)
- or -
2. Run against a certain range of values already entered in and insert the "-" wherever needed

If you want to do either of those things, please provide us with the details needed (i.e. ranges and rules).
Thanks, yeah, I could do VBA but wanted to avoid an XLSM file.
I had looked for solutions elsewhere on the web and did not find anything so was fearing that there is none other than do a CONCAT with MID to another cell:
=CONCAT(MID(A1,1,5),"-",MID(A1,6,3),"-",MID(A1,9,4),"-",MID(A1,13,2))
 
Upvote 0
Thanks, yeah, I could do VBA but wanted to avoid an XLSM file.
I had looked for solutions elsewhere on the web and did not find anything so was fearing that there is none other than do a CONCAT with MID to another cell:
=CONCAT(MID(A1,1,5),"-",MID(A1,6,3),"-",MID(A1,9,4),"-",MID(A1,13,2))
Yep, those are you 2 options - formula or VBA, as ExcelToDAX pointed out.
 
Upvote 0

Forum statistics

Threads
1,215,197
Messages
6,123,585
Members
449,108
Latest member
rache47

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