ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Copy middle digits from one cell into another (https://www.excelbanter.com/excel-worksheet-functions/124574-copy-middle-digits-one-cell-into-another.html)

Sharon R

Copy middle digits from one cell into another
 
I need a formula to copy the middle digits from one cell to another. i.e.
132sk215zb from Cell A1 and transfer only the 2sk215 into Cell D1. Can
anyone help?

RagDyeR

Copy middle digits from one cell into another
 
If the original data is always the same length, and the data to be returned
is always in the same location within that data, try this:

=LEFT(RIGHT(A1,8),6)

--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"Sharon R" <Sharon wrote in message
...
I need a formula to copy the middle digits from one cell to another. i.e.
132sk215zb from Cell A1 and transfer only the 2sk215 into Cell D1. Can
anyone help?



RagDyeR

Copy middle digits from one cell into another
 
Try this more conventional way with a single function:

=MID(A1,3,6)

--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"RagDyer" wrote in message
...
If the original data is always the same length, and the data to be
returned is always in the same location within that data, try this:

=LEFT(RIGHT(A1,8),6)

--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"Sharon R" <Sharon wrote in message
...
I need a formula to copy the middle digits from one cell to another. i.e.
132sk215zb from Cell A1 and transfer only the 2sk215 into Cell D1. Can
anyone help?




Sharon R

Copy middle digits from one cell into another
 
Thank You. Its almost perfect. It copied the first numbers from the cell,
but I actually need it to pick up the middle 5 numbers. Can you help PLEASE!
Thank You So Much!

"RagDyer" wrote:

If the original data is always the same length, and the data to be returned
is always in the same location within that data, try this:

=LEFT(RIGHT(A1,8),6)

--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"Sharon R" <Sharon wrote in message
...
I need a formula to copy the middle digits from one cell to another. i.e.
132sk215zb from Cell A1 and transfer only the 2sk215 into Cell D1. Can
anyone help?




Michael M

Copy middle digits from one cell into another
 
Hi Sharon
Are you using the 2nd formula RD submitted, 'cause it works fine.

=MID (A1,3,6).......remember to substitute A1 for whatever location you need
!!

HTH
Michael M

"Sharon R" wrote:

Thank You. Its almost perfect. It copied the first numbers from the cell,
but I actually need it to pick up the middle 5 numbers. Can you help PLEASE!
Thank You So Much!

"RagDyer" wrote:

If the original data is always the same length, and the data to be returned
is always in the same location within that data, try this:

=LEFT(RIGHT(A1,8),6)

--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"Sharon R" <Sharon wrote in message
...
I need a formula to copy the middle digits from one cell to another. i.e.
132sk215zb from Cell A1 and transfer only the 2sk215 into Cell D1. Can
anyone help?




bony_tony

Copy middle digits from one cell into another
 
Or =MID(A1,((LEN(A3)/2)-1),5) if the length of the characters varies.

Tony

On Jan 4, 8:08 am, Sharon R <Sharon
wrote:
I need a formula to copy the middle digits from one cell to another. i.e.
132sk215zb from Cell A1 and transfer only the 2sk215 into Cell D1. Can
anyone help?



David Biddulph

Copy middle digits from one cell into another
 
If you are now saying you want the middle 5 digits (though your original
example showed an output of 6 digits), what do you want if the number of
digits in A1 is even?
Try =MID(A1,(LEN(A1)-5)/2,5) or =MID(A1,ROUNDUP((LEN(A1)-5)/2,0),5)
depending on which way round you want to treat even numbers.
--
David Biddulph

"Sharon R" wrote in message
...
Thank You. Its almost perfect. It copied the first numbers from the
cell,
but I actually need it to pick up the middle 5 numbers. Can you help
PLEASE!
Thank You So Much!

"RagDyer" wrote:

If the original data is always the same length, and the data to be
returned
is always in the same location within that data, try this:

=LEFT(RIGHT(A1,8),6)

--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"Sharon R" <Sharon wrote in message
...
I need a formula to copy the middle digits from one cell to another.
i.e.
132sk215zb from Cell A1 and transfer only the 2sk215 into Cell D1. Can
anyone help?






David Biddulph

Copy middle digits from one cell into another
 
Sorry, that should have been:
=MID(A1,1+(LEN(A1)-5)/2,5) or =MID(A1,ROUNDUP(1+(LEN(A1)-5)/2,0),5)
or more simply
=MID(A1,(LEN(A1)-3)/2,5) or =MID(A1,ROUNDUP((LEN(A1)-3)/2,0),5)
--
David Biddulph

"David Biddulph" wrote in message
...
If you are now saying you want the middle 5 digits (though your original
example showed an output of 6 digits), what do you want if the number of
digits in A1 is even?
Try =MID(A1,(LEN(A1)-5)/2,5) or =MID(A1,ROUNDUP((LEN(A1)-5)/2,0),5)
depending on which way round you want to treat even numbers.
--
David Biddulph

"Sharon R" wrote in message
...
Thank You. Its almost perfect. It copied the first numbers from the
cell,
but I actually need it to pick up the middle 5 numbers. Can you help
PLEASE!
Thank You So Much!

"RagDyer" wrote:

If the original data is always the same length, and the data to be
returned
is always in the same location within that data, try this:

=LEFT(RIGHT(A1,8),6)

--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit
!
---------------------------------------------------------------------------
"Sharon R" <Sharon wrote in message
...
I need a formula to copy the middle digits from one cell to another.
i.e.
132sk215zb from Cell A1 and transfer only the 2sk215 into Cell D1.
Can
anyone help?








All times are GMT +1. The time now is 11:04 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com