Conditional Hyperlinking

P

PurchaseGuy

I have an Excel 2000 spreadsheet with 2 sheets in it that is my Purchase
Order Log.

Sheet1 = "2008 Jobs"
Column A = Job numbers
Column B = Job Names
Column C = Network path to that Job's folder (when there is one). ie:
'\\server\salesman\projects\jobfolder'

Sheet 2 = "PO's 2008"
Column C = Vendor Name
Column D = Job Name
Column E = Currently contains the following function:

IF(AND(C1>0,D1>0)=TRUE,VLOOKUP(D1,'2008 Jobs'!A:C,2,0),IF(AND(C1<1,D1<1),"",
IF(D1<1,"Need Job Number","Need Vendor")))

Which:
1. Makes sure that there is a Vendor and Job Number Entered, if not it
gives one of two error messages "Need Job Number" or "Need Vendor".
2. Looks up the Job Name on the same row as the Job number in Sheet1 and
prints it in the selected cell in Column E

What I want to do:

I want to hyperlink the Job Name (supplied by VLOOKUP) to the Network Path
(also supplied by VLOOKUP) only when there is information in Column C of 2008
Jobs.

What I am getting:

All the results are hyperlinked regardless of the results of VLOOKUP Column
C's contents.

What I tried:

I tried creating an additional IF statement that would verify that Column C
had content using a vlookup>0 and then hyperlink if vlookup=true or just
print the vlookup if false.

My hyperlink formula:

IF(AND(C5>0,D5>0)=TRUE,IF(VLOOKUP(D5,'2008
Jobs'!A:C,3,0)>0,HYPERLINK(VLOOKUP(D5,'2008 Jobs'!A:C,3,0),VLOOKUP(D5,'2008
Jobs'!A:C,2,0)),VLOOKUP(D5,'2008
Jobs'!A:C,2,0)),IF(AND(C5<1,D5<1),"",IF(D5<1,"Need Job Number","Need
Vendor")))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

?Advanced? Hyperlinking 0
VBA Coding Help for Beginner 0
Lookup cell next to data 2
lookup and display 5
displaying the correct value. 5
Naming formulas 0
Command Button to create a folder 0
IF(ISNUMBER question 0

Top