We introduce the notion of bounded quasi-inversion closed semiprime f -algebras and we prove that, if \(A\ \) is such an algebra, then any intermediate algebra in A is an order ideal of A. This extends a recent result by Domínguez who has dealt with the unital case (the problem on \( C\left( X\right) \) -type algebras has been investigated earlier by Domí nguez, Gómez-Pérez, and Mulero). It follows that if L is a Dedekind complete vector lattice with a weak order unit \(e>0\) , then any subalgebra of the universal completion \(L^{u}\) of L containing the order ideal of L generated by e is a Dedekind complete f-algebra with e as multiplicative unit. As an illustration, any subalgebra of \(C^{\infty }\left( K\right) \ \) containing \(C\left( K\right) \) , with K Stonean, is automatically a Dedekind complete f-algebra with the constant function 1 as multiplicative unit.