If $\lceil \frac{n}{r}\rceil = k$, then you have $r = k\left(\frac{wy}{hx}\right).$ This will occur precisely when $k-1\lt \frac{n}{r}\leq k$. This means that you must have $k-1 \lt \frac{nhx}{kwy}\leq k.$ If $k\gt 0$, this is equivalent to $k^2-k \lt \frac{nhx}{wy}\leq k^2.$ For $k\lt 0$, it is equivalent to $k^2-k \gt \frac{nhx}{wy}\geq k^2.$ For $k=0$, there is no solution unless $h=0$. If $k=h=0$, then you just want $-1\lt \frac{n}{r}\leq 0$.
So first determine the possible values of $k$ for which the inequalities can hold (since you, presumably, know the values of $n$, $h$, $x$, $w$, and $y$), then use that to determine the value of $r$ by specifying the value of $\lceil\frac{n}{r}\rceil$.
Added. You say below $n$ and $r$ are positive, so $k\geq 1$. Note that there is at most one value of $k$ that can work, since $(k+1)^2 - (k+1) = k^2 + k \gt k^2$. But there may be no value of $k$ that works at all.