+ Reply to Thread
Results 1 to 11 of 11

Thread: Using Fill - with a twist!

  1. #1
    Registered User
    Join Date
    07-14-2008
    Location
    North Carolina
    Posts
    5

    Lightbulb Using Fill - with a twist!

    Hello All. I'm hoping someone reading this will be able to help me out. I am familiar with using the Fill function in Excel, but I have a particular challenge that I can't seem to get to work.

    I have a list of SSN #'s. I need to increment them by 1 - but in the middle. For example:

    001-01-0001
    002-01-0001
    003-01-0001

    Get it? That third number is the one I need to increment by 1 and fill down the column. Does anyone have any ideas on how I can get this done quickly?

    Thanks!

    PamelaDV

  2. #2
    Forum Guru NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    32,636
    tRY, in A2:

    =TEXT(LEFT(A1,3)+1,"000")&MID(A1,4,255) copied down

    Where A1 contains firs s/n in series..
    Microsoft MVP - Excel

    Where there is a will there are many ways. Pick One!


    Please read the Forum Rules

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

    Preferred Charities: Lupus Canada and Sick Kids Foundation.
    Feel Free to Donate if you want to, for the assistance you received today.

  3. #3
    Cheeky Forum Moderator Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2003, 2007, 2010
    Posts
    3,701

    Using Fill - with a twist!

    If you only need to display the values, but don't need the actual entire SSN,
    try this:

    A1: 1

    Then....From the Excel Main Menu:
    <format><cells>
    Category: Custom
    Type: "001-"00"-0001"
    Click [OK]

    (A1 will display 001-01-0001 )

    Now you can use the fill functionality to continue the list down Col_A.
    A1: 001-01-0001
    A2: 001-02-0001
    A3: 001-03-0001
    etc

    Is that something you can work with?
    Post back if you have more questions.
    Regards,

    Ron
    Microsoft MVP - Excel
    (Oct 2006 - Sep 2012)

    Click here to see the Forum Rules

  4. #4
    Registered User
    Join Date
    07-14-2008
    Location
    North Carolina
    Posts
    5
    That does work well - but it is increasing the wrong number. How would I enter that custom format if I want to increase the third number instead of the 5th? Like this:

    001-00-0000
    002-00-0000
    003-00-0000

    Thanks for your help!

  5. #5
    Cheeky Forum Moderator Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2003, 2007, 2010
    Posts
    3,701

    Using Fill - with a twist!

    Apologies....I misread what you posted.

    Easily fixed....just change the custom number format to this:
    000"-00-000"
    All set?
    Regards,

    Ron
    Microsoft MVP - Excel
    (Oct 2006 - Sep 2012)

    Click here to see the Forum Rules

  6. #6
    Registered User
    Join Date
    07-14-2008
    Location
    North Carolina
    Posts
    5
    Ron - thank you so much for your assistance.

    I am still getting trouble. When I put that format into the Custom formatting - it increases the last number by 1 instead of the third number. It does this:

    001-00-0000
    001-00-0001
    001-00-0002

    instead of:
    001-00-0000
    002-00-0000
    003-00-0000

    I tried playing around with the custom formating to no avail. ;-( Any other ideas?

    PamelaDV

  7. #7
    Forum Guru NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    32,636
    You can always try my suggestion...
    Microsoft MVP - Excel

    Where there is a will there are many ways. Pick One!


    Please read the Forum Rules

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

    Preferred Charities: Lupus Canada and Sick Kids Foundation.
    Feel Free to Donate if you want to, for the assistance you received today.

  8. #8
    Registered User
    Join Date
    07-14-2008
    Location
    North Carolina
    Posts
    5
    I did use your suggestion and it worked great! I am really looking for a way to have the actual value in the field, though. Is there a way to convert the cell to store the value once I have done the calculation the way you wrote it?

  9. #9
    Forum Guru NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    32,636
    Copy the whole column, then select the top cell in the column and go to Edit|Paste Special and select Values...

    click Ok.
    Microsoft MVP - Excel

    Where there is a will there are many ways. Pick One!


    Please read the Forum Rules

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

    Preferred Charities: Lupus Canada and Sick Kids Foundation.
    Feel Free to Donate if you want to, for the assistance you received today.

  10. #10
    Cheeky Forum Moderator Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2003, 2007, 2010
    Posts
    3,701

    Using Fill - with a twist!

    Actually, this is probably easiest.....

    A1: 1000000
    <format><cells>
    ...Category: Special
    ...Type: Social Security Number
    Click [OK]

    A2: =A1+1000000
    Copy A2 and paste down as far as you need.

    Does that work for you?
    Regards,

    Ron
    Microsoft MVP - Excel
    (Oct 2006 - Sep 2012)

    Click here to see the Forum Rules

  11. #11
    Registered User
    Join Date
    07-14-2008
    Location
    North Carolina
    Posts
    5
    I knew it was something simple I was forgetting about.

    THANK YOU!

    PamelaDV

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.2.0