Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default deleting numbers prefix

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

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,872
Default deleting numbers prefix

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
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 587
Default deleting numbers prefix

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 :
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

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 587
Default deleting numbers prefix

also,

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

--
isabelle



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

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

result : 1045698712300

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to add a prefix to a column of numbers in an excel document? Beth Excel Worksheet Functions 4 August 25th 12 01:32 PM
How do I prefix a worksheet of numbers with a Minus (-) Sign Sammy Excel Worksheet Functions 4 August 31st 07 10:50 AM
+ prefix on positive numbers Slashman Excel Worksheet Functions 7 August 18th 06 12:27 PM
numbers with 0 prefix blu Excel Discussion (Misc queries) 1 March 23rd 06 07:44 PM
Adding a prefix to all numbers in a column. Randy Excel Discussion (Misc queries) 2 February 5th 06 08:11 AM


All times are GMT +1. The time now is 07:59 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"