Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 29th, 2012, 11:28 AM
Registered User
 
Join Date: Oct 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Angry Dynamic Hyperlink Based on 2 x Cell value

Hi
I have looked about but can’t see anything quite like what I need.
I apologize if there is.
I need to create a automatic hyperlink based on the value of two cells.

Example:

A1= SMITH A2= ORDERNUMBER A3= HYPERLINK

The hyperlink in A3 will be MoreInfo\ORDERS\SMITH\922908

CELL A1 IS THE CUSTOMER NAME AND A2 IS THE ORDER NUMBER, THESE WOULD CHANGE FROM LINE TO LINE

I CREATE THESE FOLDERS IN A SHARED DRIVE (MoreInfo\ORDERS\??\922??
BEFORE I ENTER THE INFO ON THE SPREADSHEET.
So I JUST NEED THE LINK TO APPEAR IN A3 AS SOON AS I FILL IN THE CUSTOMER AND ORDER IN A1 AND A2

I hope this makes sense, I hope someone can help as I am tearing my hair out here.
Thanks in advance
Kevin
 
Old December 19th, 2012, 05:00 PM
Friend of Wrox
 
Join Date: Feb 2007
Posts: 163
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Why not take care of this with a formula?
Place this formula in cell C1:
=HYPERLINK("MoreInfo\ORDERS\" & A1 & "\" & B1)

You can populate it down as far as you wish to go. If you want Excel to automatically place this formula when a1 and b1 are entered you can add a line to Worksheet_Change and/or Worksheet_Calculate to set the formula of column C to this when columns A and B aren't empty.

Hoped this helps solve your problem.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Unlocking Cells Based Upon Value of Another Cell Graviz Excel VBA 1 May 7th, 2012 11:58 AM
Add to Hyperlink Grid View cell programatically AlexW ASP.NET 4 General Discussion 0 December 31st, 2011 06:19 AM
Format cell based on another cell billy1r Excel VBA 1 June 15th, 2011 09:06 PM
How to create a Hyperlink based on Cell Contents chatguy Excel VBA 4 October 15th, 2007 09:43 PM
Hyperlink in a cell table amc Dreamweaver (all versions) 33 August 5th, 2004 12:11 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.