Swearing by other than Allah — by the Prophet ﷺ, by one's father, by one's life, honour or children — is forbidden and is counted as minor shirk; the Prophet ﷺ said, "Whoever must take an oath, let him swear by Allah or remain silent" (agreed upon), and in the Sunan, "Whoever swears by other than Allah has committed disbelief or shirk." Similarly, saying "what Allah wills and you will" or "were it not for Allah and you" places the creature alongside the Creator through the conjunction "and," which implies partnership; the Prophet ﷺ corrected a man who said "what Allah wills and you will" with "Have you made me a rival to Allah?", and Hudhayfah reported the instruction to say instead "what Allah wills, then what so-and-so wills." Allah says, "So do not set up rivals to Allah while you know" (2:22), and Ibn 'Abbas explained this verse as covering such expressions. This is minor shirk which does not expel a person from Islam, though scholars warn it is graver than the major sins; so correct the wording, seek Allah's forgiveness, and take the habit of saying "then" rather than "and."
Q&A · Belief
Is it shirk to swear by other than Allah or to say "if it weren't for Allah and you"?
Evidence — the daleel
Quran 2:22Sahih al-Bukhari and Sahih Muslim — hadith of Ibn 'Umar: 'Whoever must take an oath, let him swear by Allah or remain silent'Sunan Abi Dawud and Sunan al-Tirmidhi — hadith of Ibn 'Umar: 'Whoever swears by other than Allah has committed disbelief or shirk'Sunan Abi Dawud, Book of Adab — hadith of Hudhayfah ibn al-Yaman: do not say 'what Allah wills and what so-and-so wills', say 'what Allah wills, then what so-and-so wills'Musnad Ahmad and al-Nasa'i in 'Amal al-Yawm wa'l-Laylah — a man said to the Prophet ﷺ 'what Allah wills and you will', and he said 'Have you made me a rival to Allah?'
On deen2u
Informational, not a personal fatwa. Consult a qualified scholar for rulings on your situation.