deleting numbers prefix

P

Paula

Hi there

Can anyone tell me how to delete numbers say 6 digits prefix and say 8
numbers right to left leaving the centre visible.

ie. 00001010456987123000101010

i have 500 in Col A

ty in advance
 
C

Claus Busch

Hi Paula,

Am Wed, 6 Jun 2012 14:01:52 +0100 schrieb Paula:
Can anyone tell me how to delete numbers say 6 digits prefix and say 8
numbers right to left leaving the centre visible.

ie. 00001010456987123000101010

didn't you read my answer in the other thread?
In a helper column try it with:
=MID(A1,7,LEN(A1)-14)
then copy the helper column and paste it back as values.
Or try it with VBA:

Sub CutNum()
Dim LRow As Long
Dim first As String
Dim last As String
Dim rngC As Range

LRow = Cells(Rows.Count, "A").End(xlUp).Row
For Each rngC In Range("A1:a" & LRow)
first = Left(rngC, 6)
last = Right(rngC, 8)
rngC = Replace(Replace(rngC, first, ""), last, "")
Next
End Sub


Regards
Claus Busch
 
I

isabelle

hi Paula,

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

result : 1045698712300

--
isabelle



Le 2012-06-06 09:01, Paula a écrit :
 
I

isabelle

also,

=MID(A1,7,LEN(A1)-14)

--
isabelle



Le 2012-06-06 09:14, isabelle a écrit :
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top