[Tex/LaTex] complex table with split and merged cells


I would like to make a table like the one in the following screenshot. I could use \multicolumn to create the second row with S1,S2 etc. In the next stage i couldn't split the cells for 'V' and 'I'. complex table

Best Answer

The less vertical rules in a table, the better. If we accept this axiom, then zero is the right number of vertical rules. They serve no purpose and are simply a hindrance to reading.

Also horizontal rules should be used sparingly, mainly to separate chunks of rows that are linked together. Shifting a cell's content vertically is not needed: a blank cell in the table body means “repeat the value above”.

So here's my proposal for the table, that's quite similar to Svend Tveskæg, but differs from it in the placement of the row headers.

Note that \cmidrule(lr) is used for making clear how the groups of columns should be interpreted.




\multicolumn{2}{c}{Data1} & \multicolumn{14}{c}{Data2} \\
&& \multicolumn{2}{c}{S1} & \multicolumn{2}{c}{S2}
 & \multicolumn{2}{c}{S3} & \multicolumn{2}{c}{S4}
 & \multicolumn{2}{c}{S5} & \multicolumn{2}{c}{S6}
 & \multicolumn{2}{c}{S7} \\
&& V & I      & V & I      & V & I      & V & I      & V & I      & V & I      & V & I      \\
Subdata1 & Try1 &&&&&&&&&&&&&& \\
         & Try2 &&&&&&&&&&&&&& \\
Subdata2 & Try1 &&&&&&&&&&&&&& \\
         & Try2 &&&&&&&&&&&&&& \\
Subdata3 & Try1 &&&&&&&&&&&&&& \\
         & Try2 &&&&&&&&&&&&&& \\


enter image description here

Related Question