You should use "had ... would have" if both events are in the past.
"If I had missed the bus yesterday, I would have been late to work." (I would have been late yesterday.)
Use "had ... would" if the second event is in the present.
"If I had studied medicine in college, I would be a doctor now."