  In the ellipsoidal collapse model, the critical density for the collapse of a
gravitationally bound object is a function of its mass. In the excursion set
formalism, this translates into a moving barrier problem such that the mass
function of dark matter haloes is given by the first crossing probability of a
random walker across the barrier. In this paper, we study this first crossing
probability analytically. Complete solutions are obtained for barriers that
vary as square root of time and square of time. Large and small time asymptotic
behaviour is derived. For arbitrary power-law barriers, the large time
behaviour is determined. The solutions allow us to derive useful inferences
about the scaling of the conditional mass function in terms of present day halo
masses and look back redshifts. As an application of our results, we compare
the estimates of major merger rates of haloes in constant and moving barrier
models and find that for massive haloes ($10^{12-13} M_\odot$) the latter
predicts significantly higher merger rates towards high redshifts ($z \gtrsim
4$)
