I've tried unsuccessfully to breastfeed my baby. Should he be ok on formula?

Yes. If you have tried nursing, and for whatever reason it was not successful, your baby will be absolutely fine on formula.