Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 4
Default Stripping digits from a column

Hi,
I've a column containing alphanumeric text as 200731705A832565410B12345678.
Out of this text, I need only the 9 right most digits.
How do I go by?
TIA,
Mark

  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 3
Default Stripping digits from a column

Assuming the text is in cell A1, type =RIGHT(A1,9)

If this doesn't work, the text may contain non-printing characters. If so,
type
=RIGHT(CLEAN(C9),9)

Hope this helps.

--
BernieG


"Mike" wrote:

Hi,
I've a column containing alphanumeric text as 200731705A832565410B12345678.
Out of this text, I need only the 9 right most digits.
How do I go by?
TIA,
Mark

  #3   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 11,058
Default Stripping digits from a column

If yu have a set of mixed numbers and letters and want only the nine-most
numbers, then:

=RIGHT(returnnumerals(A2),9)

where the UDF is:


Public Function ReturnNumerals(rng As Range) As String
Dim sStr As String, i As Long, sStr1 As String
Dim sChar As String
sStr = rng.Value
For i = 1 To Len(sStr)
sChar = Mid(sStr, i, 1)
If sChar Like "[0-9]" Then
sStr1 = sStr1 & sChar
End If
Next
ReturnNumerals = sStr1
End Function
--
Gary''s Student - gsnu200770


"BernieG" wrote:

Assuming the text is in cell A1, type =RIGHT(A1,9)

If this doesn't work, the text may contain non-printing characters. If so,
type
=RIGHT(CLEAN(C9),9)

Hope this helps.

--
BernieG


"Mike" wrote:

Hi,
I've a column containing alphanumeric text as 200731705A832565410B12345678.
Out of this text, I need only the 9 right most digits.
How do I go by?
TIA,
Mark

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 customize number to 10 digits including 2 digits after deci Carina Excel Worksheet Functions 3 September 20th 07 02:50 AM
Remove first few digits from all cells in the column Magwine Excel Worksheet Functions 7 August 2nd 07 10:39 PM
Delete first two digits in column rjtees Excel Worksheet Functions 4 November 17th 05 09:22 PM
How to set a column to accept only a specified number of digits ashvik Excel Worksheet Functions 1 September 26th 05 11:11 AM
Stripping time in Pivot Table Column Header T1 Red Alarm Excel Worksheet Functions 3 May 18th 05 12:09 AM


All times are GMT +1. The time now is 02:43 AM.

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

About Us

"It's about Microsoft Excel"