+ Reply to Thread
Results 1 to 4 of 4

Have cell text fill portion of static hyperlink

  1. #1
    Registered User
    Join Date
    06-11-2011
    Location
    Carrboro, NC
    MS-Off Ver
    Excel 2010
    Posts
    32

    Exclamation Have cell text fill portion of static hyperlink

    I'd like to have excel create a link to a fixed google map based on text from another cell. Here's a link I found to provide a static google map of any location:

    http://maps.google.com/maps/api/stat...p&sensor=false

    That link will produce a static map of Boston, MA. But I can't get Excel to fill that small portion of the link that specifies location with whatever I type in a different cell.

    Example: In cell A1, I have "Boston, MA". In cell A2, I would like to have excel replace a portion of a fixed link with the text from A1.

    http://maps.google.com/maps/api/staticmap?center=THIS PART HERE SHOULD FILL WITH THE ADDRESS FROM CELL A1&zoom=15&size=512x512&maptype=roadmap&sensor=false

    But whenever I type:

    =HYPERLINK("http://maps.google.com/maps/api/staticmap?center=A1&zoom=15&size=512x512&maptype=roadmap&sensor=false";"map"),

    The map produced actually uses the text A1, rather than the text from the cell A1.

    How do I get it to populate the text from the cell into that portion of the link?

    Thanks!
    Last edited by NBVC; 06-13-2011 at 07:40 AM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,902

    Re: Have cell text fill portion of static hyperlink

    Try:

    =HYPERLINK("http://maps.google.com/maps/api/staticmap?center="&A1&"&zoom=15&size=512x512&maptype=roadmap&sensor=false";"map")

    I am not sure, though if you should have a ; or , to separate link_location from friendly_name in formula... seeing as you are in North Carolina?

    .. if above doesn't work, try:

    =HYPERLINK("http://maps.google.com/maps/api/staticmap?center="&A1&"&zoom=15&size=512x512&maptype=roadmap&sensor=false","map")
    Where there is a will there are many ways.

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

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

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2003,2007,2010
    Posts
    32,225

    Re: Have cell text fill portion of static hyperlink

    You can make this more helpful:

    =HYPERLINK("http://maps.google.com/maps/api/staticmap?center="&A1&"&zoom=15&size=512x512&maptype=roadmap&sensor=false","Map of " & A1)

    Which will then display "Map of Boston, MA" rather than just "map"

    Regards
    Trevor Shuttleworth - Excel Aid

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Registered User
    Join Date
    06-11-2011
    Location
    Carrboro, NC
    MS-Off Ver
    Excel 2010
    Posts
    32

    Re: Have cell text fill portion of static hyperlink

    Solved my problem! Thank you!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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