+ Reply to Thread
Results 1 to 4 of 4

Macro to Auto generate URLs

  1. #1
    Registered User
    Join Date
    11-20-2010
    Location
    Newcastle
    MS-Off Ver
    Excel 2003
    Posts
    4

    Smile Macro to Auto generate URLs

    Hi everyone!

    I would like to find out the best way to auto generate a list of URLs based on a field within another column on the spreadsheet.

    The spreadsheet only has two columns: one with the name of different manufacturers and the second for the URL.

    I'd like to auto generate urls as follows:

    Manufacturers URL
    Sony UK http://www.exampleurl.com/example&manufact=sonyuk?01
    Sony US http://www.exampleurl.com/example&manufact=sonyus?02
    Panasonic http://www.exampleurl.com/example&manufact=panasonic?03

    etc etc.

    Any help or pointers would be really appreciated!

    Thanks guys!

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

    Re: Macro to Auto generate URLs

    you could just join them with & at the right places.but what makes 01/02or 03 at the end?
    ="http://www.exampleurl.com/example&manufact="&a1&"?01"
    "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

  3. #3
    Registered User
    Join Date
    11-20-2010
    Location
    Newcastle
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Macro to Auto generate URLs

    Quote Originally Posted by martindwilson View Post
    you could just join them with & at the right places.but what makes 01/02or 03 at the end?
    ="http://www.exampleurl.com/example&manufact="&a1&"?01"
    Thanks, yes that will work.

    The 01, 02, 03 at the end is just a sequential counter. It isn't taken from another field. How do I get this number to automatically increase as I fill the formula down?

    Thanks again.

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

    Re: Macro to Auto generate URLs

    In the first cell, use this version, then copy the cell downward:

    ="http://www.exampleurl.com/example&manufact="&a1&"?"&TEXT(ROW(A1),"00")
    _________________
    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!)

+ 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