Both sentences are grammatically correct, but they have slightly different structures and convey a similar meaning.
"Were it not for your advice, I wouldn't have made it."
"Had it not been for your advice, I wouldn't have made it."
The first sentence uses the subjunctive mood with the verb "were." This structure is more formal and is often found in more literary or poetic contexts. It emphasizes the hypothetical or contrary-to-fact nature of the situation.
The second sentence uses a past perfect construction with the verb phrase "had it not been." This structure is slightly more common in everyday usage and tends to be seen in both formal and informal contexts.
Both sentences convey the same meaning: that the person's advice was crucial for the speaker's success. The choice between the two constructions depends on the desired tone and style of the sentence.