# Long code that needs to wrap

How would I enter this text on an 8.5x11 worksheet with 1.25inch margins all around so wraps around and does not extend onto the margins? Using normalsize text.

SolverAdd CellRef:=Worksheets("Worksheet_Alpha_Gamma_TestResult").Range("$H$43:$H$46")Relation:=5, FormulaText:="binary

-

You could use listings:

\documentclass{article}
\usepackage{lipsum}% http://ctan.org/pkg/lipsum
\usepackage[margin=1.25in,letterpaper]{geometry}% http://ctan.org/pkg/geometry
\usepackage{listings}% http://ctan.org/pkg/listings
\begin{document}
\lipsum[1]
\begin{lstlisting}[breaklines,basicstyle=\ttfamily]
SolverAdd CellRef:=Worksheets("Worksheet_Alpha_Gamma_TestResult").Range("$H$43:$H$46")Relation:=5, FormulaText:="binary
\end{lstlisting}
\lipsum[2]
\end{document}


breaklines=true allows for line-breaking within the lstlistings environment. I used basicstyle=\ttfamily, although that is not necessary.

lipsum provided some dummy text, while geometry was used to obtain the layout requirements.

-