Let $E = \ell^2$ and $T$ the following operator $$(T x)_n = b_n \, x_n$$ for a sequence $(a_n)_{n \in \mathbb N}$.
I want to choose $(b_n)_{n \in \mathbb N}$ such that
- $T$ is bounded and positive-definite operator (i.e. $\langle Tx, x\rangle > 0$ for all $x \ne 0$).
- $T$ has a closed range but not surjective.
If we take $T : \ell^2 \to \ell^2$ such that:
$$T(x_1, x_2, x_3, \ldots) = \left(x_1, \frac12 x_2, \frac13 x_3, \ldots\right),$$ we have $T$ is positive-definite operator. But I think that the range of $T$ is not closed.
Also I think that any positive bijective operator satisfies the above conditions.
There is no such sequence $(b_n)$. First note that $\langle Tx , x \rangle >0$ for $x \neq 0$ implies that $b_n >0$ for all $n$. Now suppose $(c_n)$ is orthogonal to the range of $T$. Then $\sum b_nx_nc_n=0$ for all $(x_n)$. This implies that $b_nc_n=0$ for all $n$ and hence $y_n=0$ for all $n$. Thus the range of $T$ is dense . If it is closed it has to be $\ell^{2}$.