Formula wont display correct name

katralic

New Member
Joined
Mar 16, 2023
Messages
6
Office Version
  1. 2010
Platform
  1. Windows
excel 2010
I have this formula:

=IFERROR(IF(VLOOKUP(H$3,'Customer Info'!G$2:AZ$1494,8,FALSE)=0,"",VLOOKUP(H$3,'Customer Info'!G$2:AZ$1494,8,FALSE)),"")

Which returns a persons email address stored in a database. Works great. I want to be able to click on that email address and send mail so I did this:

=HYPERLINK("mailto:"&IFERROR(IF(VLOOKUP(H$3,'Customer Info'!G$2:AZ$1494,8,FALSE)=0,"",VLOOKUP(H$3,'Customer Info'!G$2:AZ$1494,8,FALSE)),"")&"?"

All I did was add =HYPERLINK("mailto:"& to the beginning and &"?" at the end. It works fine. The problem I'm having is with the original formula it displayed the email address.
The new formula displays a hyperlink with the name "link". I want the hyperlink to display the actual email address.
Any suggestions
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
How about
Excel Formula:
=HYPERLINK("mailto:"&IFERROR(IF(VLOOKUP(H$3,'Customer Info'!G$2:AZ$1494,8,FALSE)=0,"",VLOOKUP(H$3,'Customer Info'!G$2:AZ$1494,8,FALSE)),"")&"?",IFERROR(IF(VLOOKUP(H$3,'Customer Info'!G$2:AZ$1494,8,FALSE)=0,"",VLOOKUP(H$3,'Customer Info'!G$2:AZ$1494,8,FALSE)),""))
 
Upvote 0
Solution
How about
Excel Formula:
=HYPERLINK("mailto:"&IFERROR(IF(VLOOKUP(H$3,'Customer Info'!G$2:AZ$1494,8,FALSE)=0,"",VLOOKUP(H$3,'Customer Info'!G$2:AZ$1494,8,FALSE)),"")&"?",IFERROR(IF(VLOOKUP(H$3,'Customer Info'!G$2:AZ$1494,8,FALSE)=0,"",VLOOKUP(H$3,'Customer Info'!G$2:AZ$1494,8,FALSE)),""))
Nope, didn't work. It opens mail but doesn't put the persons email address in the "to:" and also doesn't display anything in excel
 
Upvote 0
Works fine here. If you're not seeing anything in the cell, then your VLOOKUP didn't return a match.
 
Upvote 0
What happens if you use
Excel Formula:
=HYPERLINK("mailto:"&IFERROR(IF(VLOOKUP(H$3,'Customer info'!G$2:AZ$1494,8,FALSE)=0,"",VLOOKUP(H$3,'Customer info'!G$2:AZ$1494,8,FALSE)),"")&"?",IFERROR(IF(VLOOKUP(H$3,'Customer info'!G$2:AZ$1494,8,FALSE)=0,"",VLOOKUP(H$3,'Customer info'!G$2:AZ$1494,8,FALSE)),"not found"))
 
Upvote 0
Works fine here. If you're not seeing anything in the cell, then your VLOOKUP didn't return a match.
Oh crap I figured it out. In my formula I misspelled customer as custumer. When I posted this I corrected the spelling with the intent on fixing it in excel also. I forgot to change it to match my misspelling.
It worked Thank you.
 
Upvote 0
Glad it's sorted & thanks for the feedback.
 
Upvote 0
You might also want to wrap the whole thing in one IFERROR so you don't end up with invalid hyperlinks:

Excel Formula:
=IFERROR(HYPERLINK("mailto:"&IF(VLOOKUP(H$3,'Customer Info'!G$2:AZ$1494,8,FALSE)=0,"",VLOOKUP(H$3,'Customer Info'!G$2:AZ$1494,8,FALSE))&"?",IF(VLOOKUP(H$3,'Customer Info'!G$2:AZ$1494,8,FALSE)=0,"",VLOOKUP(H$3,'Customer Info'!G$2:AZ$1494,8,FALSE))),"")

If you had 365 this would be much shorter using LET. ;)
 
Upvote 0
You might also want to wrap the whole thing in one IFERROR so you don't end up with invalid hyperlinks:

Excel Formula:
=IFERROR(HYPERLINK("mailto:"&IF(VLOOKUP(H$3,'Customer Info'!G$2:AZ$1494,8,FALSE)=0,"",VLOOKUP(H$3,'Customer Info'!G$2:AZ$1494,8,FALSE))&"?",IF(VLOOKUP(H$3,'Customer Info'!G$2:AZ$1494,8,FALSE)=0,"",VLOOKUP(H$3,'Customer Info'!G$2:AZ$1494,8,FALSE))),"")

If you had 365 this would be much shorter using LET. ;)
Ya I actually changed it to have the iferror at the beginning but when it didn't work either I changed it back. Now that it works I will change it back again.
 
Upvote 0

Forum statistics

Threads
1,215,079
Messages
6,123,009
Members
449,093
Latest member
ikke

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top