Formula help

Isabella

Well-known Member
Joined
Nov 7, 2008
Messages
643
hi i need a formula that will remove the first 2 characters and the last character from the below, so below the result should be R0131644, the number of characters vary from row to row, they are not always 11


EUR01316441
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
use this:
Code:
=mid(cell number, 3, len(cell number) - 3)
 
Upvote 0
Hi,

Will the 1st 3 characters always be alphabetical then followed by a variable amount of numbers?
 
Upvote 0
use this:
Code:
=mid(cell number, 3, len(cell number) - 3)

That works but when i save the CSV file, and reopen the file the zeros vanish and on another case like below i got the result
<TABLE style="WIDTH: 53pt; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width=70 border=0 x:str><COLGROUP><COL style="WIDTH: 53pt; mso-width-source: userset; mso-width-alt: 2560" width=70><TBODY><TR style="HEIGHT: 12.75pt" height=17><TD class=xl22 style="BORDER-RIGHT: #e0dfe3; BORDER-TOP: #e0dfe3; BORDER-LEFT: #e0dfe3; WIDTH: 53pt; BORDER-BOTTOM: #e0dfe3; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" align=right width=70 height=17 x:num="6.2886000000000003E+112">6.29E+112</TD></TR></TBODY></TABLE>

When i should have got 62886E108

 
Upvote 0
CSV isn't a very forgiving format. You'll need to tag a character onto the beginning that won't "bug" you that will force the CSV to treat it as text and not "convert" it for you during save/import.

="'"&MID(C8, 3, LEN(C8) - 3)

This will result in:
'62886E108
 
Upvote 0
CSV isn't a very forgiving format. You'll need to tag a character onto the beginning that won't "bug" you that will force the CSV to treat it as text and not "convert" it for you during save/import.

="'"&MID(C8, 3, LEN(C8) - 3)

This will result in:
'62886E108

hmm, but when i copy and paste value the formula and reopen then it does not work, so how do i get around that, as i'm not allowed to show formulas
 
Upvote 0
When I use that formula, then copy/paste values to remove formulas, save, reopen, I see the same value as prior to close, so it's working for me. No ideas as to why your mileage is different.
 
Upvote 0

Forum statistics

Threads
1,213,486
Messages
6,113,932
Members
448,533
Latest member
thietbibeboiwasaco

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