Step 1: Rewrite the given function.
Given,
\[
f(x)=\frac{x^2+x+1}{x}
\]
Since \(x\neq 0\),
\[
f(x)=x+1+\frac{1}{x}
\]
Let
\[
y=x+1+\frac{1}{x}
\]
Step 2: Separate the constant term.
We know,
\[
y-1=x+\frac{1}{x}
\]
Now we find the range of
\[
x+\frac{1}{x}
\]
Step 3: Consider \(x\gt 0\).
For \(x\gt 0\),
\[
x+\frac{1}{x}\geq 2
\]
Therefore,
\[
y-1\geq 2
\]
\[
y\geq 3
\]
So, for positive \(x\),
\[
y\in[3,\infty)
\]
Step 4: Consider \(x\lt 0\).
For \(x\lt 0\),
\[
x+\frac{1}{x}\leq -2
\]
Therefore,
\[
y-1\leq -2
\]
\[
y\leq -1
\]
So, for negative \(x\),
\[
y\in(-\infty,-1]
\]
Step 5: Combine both ranges.
Thus, the complete range is
\[
(-\infty,-1]\cup[3,\infty)
\]
Step 6: Final conclusion.
Therefore,
\[
\boxed{(-\infty,-1]\cup[3,\infty)}
\]