View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
David Biddulph David Biddulph is offline
external usenet poster
 
Posts: 620
Default 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?