View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Generating a Hyperlink Macro

You don't need a macro.

in E1 put in the formula

=Hyperlink(A1&b1&"_"&C1&"_"&d1&".tif",B1&"_"&C1&"_ "&D1)

then drag fill down the column.

Adjust the concatentation to faithfully reproduce the full path of the file
(if my sample doesn't already) and alter the second argument to dipslay what
you want.

See Excel help on the Hyperlink worksheet function for details.

Regards,
Tom Oglivy

"Andy Weller" wrote in message
...
Dear all,

I have a spreadsheet with the following data:

Column A B C D
E:\HALCONtemp\ASP12.2\ -13438 -50576 8030
E:\HALCONtemp\ASP12.2\ -13445 -48132 8940
E:\HALCONtemp\ASP12.2\ -13451 -51858 7830
...

I am a somewhat newbie and am trying to generate a macro that will
enable me to hyperlink each Row in Column A and open the associated file.

So, in the example above, the folder 'E:\HALCONtemp\ASP12.2\' has the
file '-13438_-50576_8030.tif' that I would like to open (as a preview).

So, to generalise, Column A has the folder 'An' and I would like to open
the file 'Bn'_'Cn'_'Dn'.tif associated with it.

Hopefully that makes some sense. Any help would be greatly appreciated.

Andy