Creating a text to phone macro?

TinaB

New Member
Joined
Aug 1, 2017
Messages
2
Hello,

I have data coming in from a form and will need to be updated regularly - I was hoping to create a macro that combines the data for those needing it. Once imported, I will have an excel file that has phone numbers and carriers (eg TMobile, ATT etc). In order to send texts, we need to create a new column that combines the phone number with the correct @ (eg. if the carrier is tmobile it needs to be @tmomail.net, if Sprint it needs to be @messaging.sprintpcs.com, etc).

To clarify:
Column C: 1112223333 Column D: carrier I Need Column E: 111222333@specificcarrier.com

I have tried an if/then syntax, which didn't work (and it makes sense that it didn't work now that I am looking at it...)
=C1&(if D1=tmobile[@tmomail.net],[], if D1=ATT [@messaging.sprintpcs.com],[])

So, the questions I have - first, do I need to have the macro change all of the phone numbers to string/text first and then use the "&" function? How do I indicate that if the second column is not tmobile or att, then to consider if it is verizon etc.? Also, the @ symbol seems to give excel fits (but that may be the formula and not the symbol). I think I may be making this much more difficult than it should be. Any suggestions?

Does this make sense? Thank you for any help that you can give me!
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
maybe
=C1&(if D1=tmobile"@tmomail.net","", if D1=ATT "@messaging.sprintpcs.com","")
 
Upvote 0
Thanks mole999! Unfortunately that didn't work either, but I think I finally figured it out! (Just in case anyone else ever needs this and struggles like I was...)

=C1&IF(D1="Tmobile","@tmomail.net","")&IF(D1="Verizon","@verizon.net","") etc.

Now how to "idiot proof" it for multiple users ;)
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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