+ Reply to Thread
Results 1 to 3 of 3

auto fill custom format numbers

Hybrid View

  1. #1
    Registered User
    Join Date
    08-03-2009
    Location
    Australia
    MS-Off Ver
    Excel 2016
    Posts
    19

    auto fill custom format numbers

    I have the following list of numbers

    0000 0000 0000 0000 0000 0100
    0000 0000 0000 0000 0000 0101
    0000 0000 0000 0000 0000 0102

    and I need to continue the list to

    0000 0000 0000 0000 0000 0326

    I tried dragging by the grip in the bottom right hand corner but it changes the first didit only.

    I tried to put it the numbers in the format

    100
    101
    102

    and using a custom format number to put in the extra zeros. This worked fine until I used a countif (or it may of been a lookup) statement in my code to look for 0000 0000 0000 0000 0000 0100 and it can't find it as the number is 100.

    Is there away around this that will save me typing in an awful lot of zeros.

    Thanks
    Last edited by NDBC; 10-15-2009 at 03:36 AM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: auto fill custom format numbers

    Given limit of 326... if you need the physical values to be text values

    A1: 0000 0000 0000 0000 0000 0101

    Then

    A2: =TEXT(1+SUBSTITUTE(A1," ",""),"0000 0000 0000 0000 0000 0000")
    copied down

    If on the other hand the values can be stored as numbers then set

    A1: 101

    Then

    A2: =1+A1
    copied down
    apply a Custom Format to A1:226 of: 0000 0000 0000 0000 0000 0000
    Last edited by DonkeyOte; 10-15-2009 at 02:28 AM. Reason: incorrect ref to 1 rather than 101

  3. #3
    Forum Contributor
    Join Date
    01-18-2005
    Location
    Auckland New Zealand
    MS-Off Ver
    Office Professional 2007
    Posts
    295

    Re: auto fill custom format numbers

    In C1 I have 99
    In C2 I have "0000 0000 0000 0000 "&C$1+ROW()-1
    Copy the formula in C2 down as far as required.

    I've used the result in a lookup thus:
    =VLOOKUP("0000 0000 0000 0000 104",data,2,FALSE)
    where data is the name for the range of these numbers plus one column to the right,
    and a value in that column is returned.

    hth
    Mike

+ 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.6.0 RC 1