+ Reply to Thread
Results 1 to 8 of 8

How to create a sequentially numbered URL list

  1. #1
    Registered User
    Join Date
    01-15-2006
    Posts
    6

    How to create a sequentially numbered URL list

    I've been thinking of some way to do this, and it seems Excel is a good choice.

    What I want to do is create a list of URLs as below :


    www.whatever.com/subfolder/1.pdf
    www.whatever.com/subfolder/2.pdf
    www.whatever.com/subfolder/3.pdf
    www.whatever.com/subfolder/4.pdf
    .
    .
    .
    .
    .
    www.whatever.com/subfolder/17000.pdf
    www.whatever.com/subfolder/17001.pdf
    www.whatever.com/subfolder/17002.pdf

    Can this be done reasonably easily ?
    If so, can someone provide a sample spreadsheet or formulae with variable starting and ending points.
    eg starts at 1.pdf and ends at 17002.pdf in the above example.

    thanks guys !

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: How to create a sequentially numbered URL list

    Run this macro...
    Please Login or Register  to view this content.
    Sit back...it takes a bit of time.
    Last edited by JBeaucaire; 03-01-2009 at 12:03 AM.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: How to create a sequentially numbered URL list

    is it just a list you want or as above usable url's?
    if you just want a list for use elsewhere
    ="www.whatever.com/subfolder/"&ROW()&".pdf" dragged down
    will start numbering from whatever row you put it in
    then copy/paste back special values .
    or even
    =HYPERLINK("http://www.whatever.com/subfolder/"&ROW()&".pdf")
    which will create usable url's
    edit for somereason my workbook is closing once hyperlink activated
    im trying to find out why.(anyone else know why?)
    Attached Files Attached Files
    Last edited by martindwilson; 03-01-2009 at 10:53 AM.
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  4. #4
    Registered User
    Join Date
    01-15-2006
    Posts
    6

    Re: How to create a sequentially numbered URL list

    Yes, sorry for the delay. Been busy in more ways than I can count, and in fact I've only tried the macro a week ago.
    The Macro worked well, so thanks !

    However, I'm now trying to do it again, but it seems that after the latest batch of Windows updates, that Excel 2007 no longer likes the macro as I get a compile error when I run it.

    Any ideas why ?

  5. #5
    Registered User
    Join Date
    01-15-2006
    Posts
    6

    Re: How to create a sequentially numbered URL list

    Anyone got a fix for the compile error in Excel 2007?

  6. #6
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: How to create a sequentially numbered URL list

    Hi martin

    I have no problem with your workbook closing as you describe.
    There is a bit of scrap code that means the workbook has to be macro enabled, but that is no problem to clear.

    Might I suggest this slight mod to your formula?

    Please Login or Register  to view this content.
    This means you can enter the first formula in any cell, then fill/drag down.

    morph000

    Where is the error showing and what is the number/description?

    Post the code you are using and point to the line the error occurs in.

    or possibly try
    Please Login or Register  to view this content.
    then fill down
    As a variation on what martin suggests.

    Cheers
    Last edited by Marcol; 06-05-2010 at 06:14 AM.

  7. #7
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: How to create a sequentially numbered URL list

    This VBa seems to work reasonably fast, might be worth a try, it should be faster than using a loop
    Please Login or Register  to view this content.

    To make it more flexible this might be better
    You can chose the range to fill and the number to start with.
    Please Login or Register  to view this content.

    Hope this helps.

    If you need any further information, please feel free to ask further

    However

    If this takes care of your needs, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED. It helps everybody!
    Also
    If you are satisfied by any members response to your problem please consider using the scales icon top right of thier post to show your appreciation.

  8. #8
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: How to create a sequentially numbered URL list

    I usually hate unnecessary loops. My macro loops and takes about 8 seconds to run as a result.

    Marcol's is loopless and seems to be instantaneous, thus a far superior solution for this problem by my standards.

    Good job Alistair.

+ 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