By text message, do you mean by WhatsApp? Or just SMS?
If you sent SMS and deleted it, unless you're phone is in airplane mode, there's high chance that your message is sent. And SMS has nothing to do with Mobile Data.
Incase you typed a very long message and it got converted to MMS, unless you had switched ON Mobile Data (as in most phones, if your phone doesn't automatically turn on Mobile Data to send MMS), and if you had deleted it before switching Mobile Data ON, the MMS will not be sent.
If you're talking about WhatsApp or any other online messaging app, then if you had sent message while Mobile Data/WiFi was switched OFF, and if you deleted it before you switched ON Mobile Data/WiFi, then the message deleted will not be sent.