Wrox Programmer Forums
|
BOOK: Excel 2000/2002 VBA Programmer's Reference
This is the forum to discuss the Wrox book Excel 2000 VBA: Programmers Reference by John Green, Stephen Bullen, Felipe Martins, Brian Johnson; ISBN: 9780764544019
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Excel 2000/2002 VBA Programmer's Reference section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 30th, 2008, 03:48 PM
Registered User
 
Join Date: Sep 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Removal of Numbers from Column

I am working on a spreadsheet that needs to be mail merged onto a word doc. Part of what I am merging is SSN's. I do not want to put all 9 digits, just the last 4. I have them entered into the spreadsheet as xxx-xx-xxxx. What type of formula do I write to remove the xxx-xx from the cell so I can mail merge these digits into a word doc.
 
Old March 5th, 2009, 01:55 AM
Registered User
 
Join Date: Feb 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Wink Extracting only numbers from SSN

It is quite easy, suppose you have 14 digit numbers like ABCDE123456789 in cell[ A1], from which you can extract the last nine digits with the formula as below

=VALUE(RIGHT(A1,LEN(A1)-5)

Otherwise, if the number looks like 123456789ABCDE then the fornula

=VALUE(LEFT(A1,LEN(A1)-5) will do the trick.

Else if your number looks like ABC123456789DE then also, the formula

=VALUE(MID(A1,4,LEN(A1)-5) will work.

Does this answer your question? If not, please feel free to ask your specific question related to the problem

Vikram S. Mathur





Similar Threads
Thread Thread Starter Forum Replies Last Post
namespace removal manish_jaiswal XSLT 5 February 15th, 2008 05:40 AM
adding column numbers decren Javascript How-To 2 May 5th, 2007 07:48 AM
VBA Column Sort Order and numbers Jack1000 BOOK: Access 2003 VBA Programmer's Reference 1 October 5th, 2006 10:53 PM
Removal of modules slgknjn Excel VBA 0 September 24th, 2004 12:35 AM
Chapt 6 Removal from an ArrayList Jerry Obrien BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003 0 February 19th, 2004 02:40 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.