Remove characters before and after

sholleman

New Member
Joined
Mar 2, 2015
Messages
7
[TABLE="width: 256"]
<tbody>[TR]
[TD="colspan: 4"]This is what i have: (The 0 and CA are on one line- 4 lines total)

000433821517 00114427
0 CA[/TD]
[/TR]
[TR]
[TD="colspan: 4"]000645000670 00234411 0 CA[/TD]
[/TR]
[TR]
[TD="colspan: 4"]000790810056 00229763 0 CA[/TD]
[/TR]
[TR]
[TD="colspan: 4"]000901000017 00068794 0 CA[/TD]
[/TR]
</tbody>[/TABLE]

This is what I want (keep second column, remove front zeros, add k to front)
[TABLE="width: 256"]
<tbody>[TR]
[/TR]
[TR]
[/TR]
[TR]
[/TR]
[TR]
[TD="colspan: 4"][/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 64"]
<tbody>[TR]
[TD="width: 64"]k114427[/TD]
[/TR]
[TR]
[TD]k234411[/TD]
[/TR]
[TR]
[TD]k229763[/TD]
[/TR]
[TR]
[TD]k68794

[TABLE="width: 256"]
<tbody>[TR]
[/TR]
[TR]
[/TR]
[TR]
[/TR]
[TR]
[TD="colspan: 4"][/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
 
Thanks! It worked. :)





If that's what you got from that formula, it looks like there are several spaces in there
000433821517______00114427

The _ represents a space, because the forum software will remove consecutive spaces.

Try
="k"&MID(TRIM(A1),16,6)
 
Upvote 0

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