[Tex/LaTex] Table with multirow and multicolumn

multicolmultirowtables

I want to create a table with \multirow and \multicolumn in LaTeX.

I tried some post 1, 2, 3 to create my table but because I wasn't able to create my table.

Please help me with LaTeX code for the table given below.

enter image description here

I wrote this code so far:

\begin{tabular}{ |p{5cm}|p{4cm}|p{3cm}|p{3cm}| } 
\hline 
\multicolumn{4}{|c|}{\textbf{Crop field location info}} \\ 
\hline 
\textbf{District name} & \textbf{Tehsil name} & \textbf{UC name} 
  & \textbf{UC \#}\\ & & &\\ 
\hline  
\multicolumn{4}{|c|}{\textbf{Farmer's info}} \\ 
\hline 
\textbf{Farmer name} & \textbf{Farmer contact \#}
  & \multicolumn{2}{ |c| }{\textbf{Farmer's land holding (acres)}} \\ 
& & \multicolumn{2}{ |c| }{} \\ 
\hline 
\textbf{Item} & \textbf{Unit} & \textbf{Rate/Unit} & \textbf{Total Cost}\\
\hline 
\end{tabular} 

Best Answer

Your effort for prepare MWE is to minimal :_), so I down wrote from your image only beginning of table. For your table you don't need multirow cells. An simple solution is as follows:

\documentclass{article}

%just for show only a table
\usepackage[active,tightpage]{preview}
\PreviewEnvironment{tabular}
    \setlength\PreviewBorder{1em}


    \begin{document}
    \sffamily
    \small
    \renewcommand{\arraystretch}{1.2}
\begin{tabular}{|p{0.4\textwidth}   % determine column width to your wish
                |p{0.1\textwidth}
                |p{0.15\textwidth}
                |p{0.15\textwidth}
                |p{0.20\textwidth}|
                }
    \hline
\multicolumn{5}{|c|}{Crop field location info}\\
    \hline
District name & 
    \multicolumn{2}{|c|}{Tehsil name} 
                    & UC name   & UC \#                     \\[2em]
    \hline
\multicolumn{5}{|c|}{Farmer's info}                         \\
    \hline
Farmer name &
    \multicolumn{2}{|c|}{Farmer contract \#} 
                    & 
    \multicolumn{2}{|c|}{Farmer's Land holdings (acres)}    \\[2em]
    \hline
Item        & Unit  & Quality   & Rate/Unit & All cost      \\
    \hline
% repeat regarding to your table contents ...   
\multicolumn{1}{|c}{}
            &
    \multicolumn{4}{ c|}{Land preparation cost}             \\
    \hline
Ploughing \& planking (Bullocks)       
            & Rs./Hr  &         &           &               \\
    \hline
etc         &         &         &           &               \\
    \hline
\end{tabular}
    \end{document}

enter image description here