Insert Charters into a number string vba or formula?

irrefutable14

New Member
Joined
Mar 2, 2017
Messages
25
I'd like to update a string of numbers and add charters before each string of numbers. IE

006-01-00-00
R006-B01-S00-P00
006-01-01-00
R006-B01-S01-P00

<tbody>
</tbody>

:confused:
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
If your inputs are always text strings in exactly the format 000-00-00-00 and the characters to be inserted are always R, B, S, P in exactly those positions, then you can do it like this

="R"&left(a1,4)&"B"&mid(a1,5,3)...and so on.

If there is more variety to your situation, you'll need something more complicated.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,834
Messages
6,121,876
Members
449,056
Latest member
ruhulaminappu

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