Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default How do I create a macro to put "-" between existing numbers?

I have a spreadsheet containing Social Security numbers. All need to be in
the format ###-##-####. How do I create a macro to do this on a cell that
has the format #########?

So far what I get is that the macro changes the SS# to be the same as the
one I changed when creating the macrol.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,119
Default How do I create a macro to put "-" between existing numbers?

Why not just do it with a custom format. Select the area you want to modify
and right click. Choose Format Cells. Choose Custom. Type in 000-00-0000...
--
HTH...

Jim Thomlinson


"Steverino" wrote:

I have a spreadsheet containing Social Security numbers. All need to be in
the format ###-##-####. How do I create a macro to do this on a cell that
has the format #########?

So far what I get is that the macro changes the SS# to be the same as the
one I changed when creating the macrol.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default How do I create a macro to put "-" between existing numbers?

Thanks for the help. However, I am creating a spreadsheet to use as an
import to setup a database. I therefore actually need to insert the dashes.

"Jim Thomlinson" wrote:

Why not just do it with a custom format. Select the area you want to modify
and right click. Choose Format Cells. Choose Custom. Type in 000-00-0000...
--
HTH...

Jim Thomlinson


"Steverino" wrote:

I have a spreadsheet containing Social Security numbers. All need to be in
the format ###-##-####. How do I create a macro to do this on a cell that
has the format #########?

So far what I get is that the macro changes the SS# to be the same as the
one I changed when creating the macrol.

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
Validation ?:Accepting both Numbers AND specific letters("N","n"," Antonio Excel Discussion (Misc queries) 2 April 22nd 08 05:07 PM
Insert "Proper Function" into existing macro jackel[_14_] Excel Worksheet Functions 10 March 10th 08 04:00 PM
create links to check boxes marked "good" fair"and "bad" pjb Excel Worksheet Functions 3 April 20th 06 02:17 AM
SaveAs macro: How do I specify "Replace existing file?" [email protected] Excel Programming 1 May 24th 05 02:36 AM
How do you replace an existing file, saying "yes" in a macro? Chris Excel Programming 0 November 19th 03 03:25 PM


All times are GMT +1. The time now is 07:56 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"