Solved

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

Posted on 2014-09-04
4
105 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Convert between Excel file formats (.XLS, .XLSX, .XLSM) with/without macro option David Miller (dlmille) Intro Over this past Fall, I've had the opportunity to see several similar requests and have developed a couple related solutions associate…
How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

749 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