# Formula help

#### Isabella

##### Well-known Member
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

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.

#### ajetrumpet

##### Banned for being rude
use this:
Code:
=mid(cell number, 3, len(cell number) - 3)

#### shemayisroel

##### Well-known Member
Hi,

Will the 1st 3 characters always be alphabetical then followed by a variable amount of numbers?

#### Isabella

##### Well-known Member
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

#### jbeaucaire

##### Well-known Member
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

#### Isabella

##### Well-known Member
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

#### jbeaucaire

##### Well-known Member
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.

#### Isabella

##### Well-known Member
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.

Did you save it as a csv?

#### jbeaucaire

##### Well-known Member
Of course, else my previous post would be irrelevant.

Replies
8
Views
451
Replies
4
Views
137
Replies
6
Views
162
Replies
7
Views
115
Replies
6
Views
80

1,190,759
Messages
5,982,760
Members
439,794
Latest member
rhonllanders

### 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.

### Which adblocker are you using?

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

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