Solved

Excel - anybody could help me to complete this competition with vlookup

Posted on 2014-09-04
4
96 Views
Last Modified: 2014-09-04
Dear EE,

i've this time this formula below and is working great so far.

=IFERROR(SUBSTITUTE(SUBSTITUTE(LOWER(RIGHT(B3;(LEN(B3))-(SEARCH(",";B3))-1)&"."&LEFT(B3;(SEARCH(",";B3)-1))&"@"&VLOOKUP(B24;A18:B21GUL;2;FALSCH));" ";"");"/,";"");SUBSTITUTE(B3;" ";"")&"@"&VLOOKUP(B24;A18:B21;2;FALSE))

but i like 3 different smtp's in D9,D10,D11 depends on Cell B24

if B24 = GUL     D9 =  gul.com, D10 = gul.com   D11=gul.com                       
if B24 = GUL2   D9 =  gul.com, D10 = gul.com   D11=gul.com                        
if B24 = GIL      D9 =  gul.com, D10 = gil.com     D11=gul.com                        
if B24 = GIL2    D9 =  gul.com, D10 = gil.com     D11=gul.com                        
if B24 = LEL     D9 =  lel.com,   D10 = leld.com   D11=gel.com                        

Pls see picture and excel example below
example pictureSUBSTITUTE--1-.xlsx
0
Comment
Question by:Mandy_
  • 2
  • 2
4 Comments
 
LVL 27

Expert Comment

by:Glenn Ray
ID: 40304439
The three formulas in D9, D10, and D11 were modified to look at a larger range (A18:D22) and to look in respectively further columns each time:

D9: =IFERROR(SUBSTITUTE(SUBSTITUTE(LOWER(RIGHT(B3,(LEN(B3))-(SEARCH(",",B3))-1)&"."&LEFT(B3,(SEARCH(",",B3)-1))&"@"&VLOOKUP(B24,A18:D22,2,FALSE))," ",""),"/,",""),SUBSTITUTE(B3," ","")&"@"&VLOOKUP(B24,A18:D22,2,FALSE))

D10: =IFERROR(SUBSTITUTE(SUBSTITUTE(LOWER(RIGHT(B3,(LEN(B3))-(SEARCH(",",B3))-1)&"."&LEFT(B3,(SEARCH(",",B3)-1))&"@"&VLOOKUP(B24,A18:D22,3,FALSE))," ",""),"/,",""),SUBSTITUTE(B3," ","")&"@"&VLOOKUP(B24,A18:D22,2,FALSE))

D11: =IFERROR(SUBSTITUTE(SUBSTITUTE(LOWER(RIGHT(B3,(LEN(B3))-(SEARCH(",",B3))-1)&"."&LEFT(B3,(SEARCH(",",B3)-1))&"@"&VLOOKUP(B24,A18:D22,4,FALSE))," ",""),"/,",""),SUBSTITUTE(B3," ","")&"@"&VLOOKUP(B24,A18:D22,2,FALSE))

Note that I did not change any of the casing for the name (i.e., upper/lower case).  

I also intentionally added errors to the lookup range (=1/0...#DIV/0!) in order to force the function to return the default domain name.

Example workbook attached.

Regards,
-Glenn
EE-Formulas.xls
0
 
LVL 2

Author Comment

by:Mandy_
ID: 40304521
Dear Glenn,

thank you, i will try that but the attachment seems to be a wrong one...
0
 
LVL 27

Accepted Solution

by:
Glenn Ray earned 500 total points
ID: 40304571
Heh...whoops!  Working on two different problems...

Here's the correct file.
EE-SUBSTITUTE--1.xlsx
0
 
LVL 2

Author Closing Comment

by:Mandy_
ID: 40304593
Great work. Excellent!
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

What is a Form List Box? (skip if you know this) The forms List Box is the alternative to the ActiveX list box. If you are using excel 2007, you first make sure you have a developer tab (click the Orb)->"Excel Options"->Popular->"Show Developer tab…
Sparklines have been introduced with Excel 2010 and are a useful tool for creating small in-cell charts, used for example in dashboards. Excel 2010 offers three different types of Sparklines: Line, Column and Win/Loss. What it does not offer is a…
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now