Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How do I shorten a 17 digit field to a 6 digit field?

I am using Microsoft Exce 2002. I am trying to shorten a few hundred 17
digit alphanumeric fields to just the last 6 digits of the 17 digit fields.
Any ideas would be helpful.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 95
Default How do I shorten a 17 digit field to a 6 digit field?

One approach can be with the worksheet formula RIGHT. If you have you data
in column A, something like this in column B will do what you want:
=RIGHT(A1,6)

Hope this helps,
Miguel.

"Paul Bass" wrote:

I am using Microsoft Exce 2002. I am trying to shorten a few hundred 17
digit alphanumeric fields to just the last 6 digits of the 17 digit fields.
Any ideas would be helpful.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default How do I shorten a 17 digit field to a 6 digit field?

Sub shorten()
For i = 1 To Cells(Rows.Count, "e").End(xlUp).Row
Cells(i, "e").Value = Right(Cells(i, "e"), 6)
Next i
End Sub

--
Don Guillett
SalesAid Software

"Paul Bass" <Paul
wrote in message
...
I am using Microsoft Exce 2002. I am trying to shorten a few hundred 17
digit alphanumeric fields to just the last 6 digits of the 17 digit
fields.
Any ideas would be helpful.



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 do I sort a column in Excel by the last digit in each field jmdyt Excel Discussion (Misc queries) 1 April 24th 07 03:31 AM
Convert 2 digit month to 4 digit years and months BB Excel Worksheet Functions 2 September 17th 06 09:33 PM
How do I shorten 10-digit # so only 6 digits show up? swingkittenva Excel Discussion (Misc queries) 3 January 6th 06 04:49 PM
Color a single digit in a mult-digit number cell Phyllis Excel Discussion (Misc queries) 6 November 17th 05 12:46 AM
When we enter a 16 digit number (credit card) the last digit chan. ceking Excel Discussion (Misc queries) 5 December 8th 04 11:45 PM


All times are GMT +1. The time now is 12:30 PM.

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"