Warning

 

Close
Confirm Action

Are you sure you wish to do this?

Cancel Confirm
AR15.COM
1/3/2014 9:09:05 AM EDT
I'm making a distribution list for employees that we can email a SMS message in the event of 2 hour delay, closing, etc...  I have a spread sheet with their 10 digit phone numbers (ex 31711114444).  In the next column, I have their cell phone carrier (AT&T, Verizon, etc...).  I'm trying to use a LOOKUP function to create the addresses (sms phone numbers) to create the distribution list.  The lookup table has the following values   D1  Verizon   E1  @vtext.com   D2  AT&T  E2  @txt.att.net    etc...

Basically, I want to add a 10 digit phone number and cell provider in and have it put the following text behind the number in the next cell.  I don't have trouble with joining 2 cells, I just can't get the lookup to work. It keeps dropping a #N/A in the blank cells.  Not all employees have provided a cell number.  If it's blank, I want the cell to return a blank.   Then, I can copy those sms addresses into outlook and email an update.  Not sure if I should be using vlookup, lookup, etc...

Please help!
1/3/2014 9:14:04 AM EDT
[#1]
I've never used a lookup function in excel, so I'm no help there.

If you want to search just do Ctrl+f you don't need a lookup function.

You really should learn access if you don't already know it. Access is for databases, excel is for processing data (not storing, looking up information).
1/3/2014 9:17:56 AM EDT
[#2]
I tried with the MATCH function too.

=MATCH(D9,$D$1:$E$6,0)

but, I'm still getting a #N/A when there is no phone number in the cell.
1/3/2014 9:19:55 AM EDT
[#3]
Quote History
Quoted:
I've never used a lookup function in excel, so I'm no help there.

If you want to search just do Ctrl+f you don't need a lookup function.

You really should learn access if you don't already know it. Access is for databases, excel is for processing data (not storing, looking up information).
View Quote


I'm not trying to look anything up.  

I would like to enter the following:

3171114444
and
AT&T

Then, in another cell it would produce:  

[email protected]

1/3/2014 9:22:56 AM EDT
[#4]
Quote History
Quoted:


I'm not trying to look anything up.  

I would like to enter the following:

3171114444
and
AT&T

Then, in another cell it would produce:  

[email protected]

View Quote View All Quotes
View All Quotes
Quote History
Quoted:
Quoted:
I've never used a lookup function in excel, so I'm no help there.

If you want to search just do Ctrl+f you don't need a lookup function.

You really should learn access if you don't already know it. Access is for databases, excel is for processing data (not storing, looking up information).


I'm not trying to look anything up.  

I would like to enter the following:

3171114444
and
AT&T

Then, in another cell it would produce:  

[email protected]




You can use a vlookup table along with the concatenate function, or you can use a nested IF statement.


ETA - Access is WAY overkill for what you're trying to do.  Don't go down that road.
1/3/2014 9:23:58 AM EDT
[#5]
If formula
=IF(B2="","",B2&VLOOKUP(C2,$G$2:$H$4,2,FALSE))
in words, If Cell phone is blank, return blank, if not




return cell phone number and lookup carrier in column D, returning the second column containing the SMS string)






 
1/3/2014 9:24:04 AM EDT
[#6]
=if(A1="","",Dothis)

Reads as, if cell A1 = Blank then return blank, else do this
1/3/2014 9:25:22 AM EDT
[#7]
=concatenate(a1, "@", b1)

Do a find/replace on their provider first

1/3/2014 9:25:46 AM EDT
[#8]
Use +VLOOKUP



Remember that the source data has to be sorted.
1/3/2014 9:28:30 AM EDT
[#9]
I think the vlookup function will do what you want.

If I understand correctly, you would use the carrier as the variable to go into the array of numbers and carriers, puling out the Verizons, AT&Ts, etc. so that you can append the correct...appendage ().

Sorry I'm not more help; the last lookup I did was to use the current date to lookup the appropriate variables for the day and load them into a form.
1/3/2014 9:32:03 AM EDT
[#10]
=IF(B6="","",B6&VLOOKUP(C6,$D$1:$E$2,2,FALSE))












B6 is the cell phone number, C6 is the carrier, D1:E2 is the lookup table




















 

 
1/3/2014 9:35:56 AM EDT
[#11]
If you want to get rid of the #N/A display, wrap the vlookup function in an iferror function, such as  =iferror(vlookup(b1,lookuptable,2,false),"")
This will return a blank ("") if the embedded vlookup function returns an error.




Use "&" to join your cells









1/3/2014 9:40:06 AM EDT
[#12]
Quote History
Quoted:
=B6&VLOOKUP(C6,D1:E2,2,FALSE)

B6 is the cell phone number, C6 is the carrier, D1:E2 is the lookup table

View Quote


This is really close, but I'm still getting a #N/A if there is no phone number in the cell!  This is close...

1/3/2014 9:42:01 AM EDT
[#13]
Quote History
Quoted:
If you want to get rid of the #N/A display, wrap the vlookup function in an iferror function, such as  =iferror(vlookup(b1,lookuptable,2,false),"")This will return a blank ("") if the embedded vlookup function returns an error.

Use "&" to join your cells


http://i1304.photobucket.com/albums/s527/domoarrigato/xl.gif

View Quote


This is close too, but I don't want to have to enter the "txt.att.net".  I just want to enter AT&T and have it do the rest.  Reason, is because I have employees with a bunch of different carriers and they are all different.
1/3/2014 9:42:07 AM EDT
[#14]
I have a working solution, can you send me your email?

1/3/2014 9:44:21 AM EDT
[#15]


Quote History
Quoted:
This is really close, but I'm still getting a #N/A if there is no phone number in the cell!  This is close...





View Quote View All Quotes
View All Quotes
Quote History
Quoted:





Quoted:


=B6&VLOOKUP(C6,D1:E2,2,FALSE)





B6 is the cell phone number, C6 is the carrier, D1:E2 is the lookup table











This is really close, but I'm still getting a #N/A if there is no phone number in the cell!  This is close...





See edit


 
1/3/2014 9:44:42 AM EDT
[#16]
You can also nest the vlookup in a =IFERROR(VLOOKUP(a1,B1:B10,1,0),"ERROR")

This will return ERROR or whatever you want if vlookup has a problem and gives the #N/A
1/3/2014 9:45:24 AM EDT
[#17]

Quote History
Quoted:
This is close too, but I don't want to have to enter the "txt.att.net".  I just want to enter AT&T and have it do the rest.  Reason, is because I have employees with a bunch of different carriers and they are all different.

View Quote View All Quotes
View All Quotes
Quote History
Quoted:



Quoted:

If you want to get rid of the #N/A display, wrap the vlookup function in an iferror function, such as  =iferror(vlookup(b1,lookuptable,2,false),"")This will return a blank ("") if the embedded vlookup function returns an error.



Use "&" to join your cells





http://i1304.photobucket.com/albums/s527/domoarrigato/xl.gif







This is close too, but I don't want to have to enter the "txt.att.net".  I just want to enter AT&T and have it do the rest.  Reason, is because I have employees with a bunch of different carriers and they are all different.

Sorry I wasn't clear. The txt.att.net was returned by the vlookup function, based on the AT&T entered in the prior column. That's also where the iferror function is pu to use.

 


1/3/2014 9:49:58 AM EDT
[#18]
Quote History
Quoted:
Sorry I wasn't clear. The txt.att.net was returned by the vlookup function, based on the AT&T entered in the prior column. That's also where the iferror function is pu to use.  

View Quote View All Quotes
View All Quotes
Quote History
Quoted:
Quoted:
Quoted:
If you want to get rid of the #N/A display, wrap the vlookup function in an iferror function, such as  =iferror(vlookup(b1,lookuptable,2,false),"")This will return a blank ("") if the embedded vlookup function returns an error.

Use "&" to join your cells


http://i1304.photobucket.com/albums/s527/domoarrigato/xl.gif



This is close too, but I don't want to have to enter the "txt.att.net".  I just want to enter AT&T and have it do the rest.  Reason, is because I have employees with a bunch of different carriers and they are all different.
Sorry I wasn't clear. The txt.att.net was returned by the vlookup function, based on the AT&T entered in the prior column. That's also where the iferror function is pu to use.  



That worked!  Thank you guys, that was very helpful.
1/3/2014 10:49:31 AM EDT
[#19]
Sounds like the Concatenate function would've done what you are looking for if you simplified the carrier to ATT, or V etc.