the first thing to say is that I hate tables in latex when they are a little bit complicate. 🤦‍♂️ Then, I am trying to make a table with multirow and multicolumn. I found my questions answered several times, in

Text wrapping in multirow columns

Missing right vertical line in a multirow in a table

Missing vertical lines in the latex table

Border with multirow and multicolumn

Text wrapping in multirow columns

Scale column of a table in percentage of \textwidth

Latex Multirow Table with specified column width

but, I don't know why, neither of the answers apparently work in my case. I have this table:

\multicolumn{2}{|l}{\textbf{Funzione}} & \textbf{Definizione} \\ \hline

\multicolumn{2}{|l}{\texttt{=SOMMA.SE(int; criterio; int\_somma)}} & Somma le celle di intervallo\_somma secondo un criterio assegnato ad un intervallo. \\ \hline

\multicolumn{2}{|l}{\texttt{=CONTA.SE(int; criterio)}} & Conta il numero di celle nell'intervallo che corrispondono al criterio dato. \\ \hline

\multicolumn{2}{|l}{\texttt{=MEDIA.SE(int; criterio; int\_media)}} & Determina la media delle celle di intervallo\_media secondo un criterio assegnato ad un intervallo. \\ \hline

\texttt{=SOMMA.PIÙ.SE} & \multirow{4}{0.25\linewidth}{\texttt{(int;} \\ \texttt{int\_criterio1; criterio1;} \\ \texttt{int\_criterio2; criterio2; ...)}} & \multirow{4}{0.5\linewidth}{Esegue la funzione per le celle di un sottoinsieme dell'intervallo specificate da un determinato insieme di criteri.} \\

\texttt{=MEDIA.PIÙ.SE}  \\
\texttt{=MAX.PIÙ.SE}   \\
\texttt{=MIN.PIÙ.SE}  \\ \hline

\multicolumn{2}{|l}{\texttt{=SOMMA.SE(int; criterio; int\_somma)}} & Conta il numero di celle specificate da un determinato insieme di condizioni o criteri. \\ \hline



Resulting as

enter image description here

As you can see there's a lot to fix.

  1. The first thing is the width of the columns: I set 25%, 25% and 50% but the third column is clearly less than 50%.
  2. The first multirow "(int; int_criterio1[...]" is trimmed. Is there a way to enlarge the height to fit all the content?
  3. On the second multirow "Esegue la funzione per le celle di..." it draws only the first row right border. I tried putting & & on the rows below, it makes the border, but the multirow is invalidated returning to one row
  4. Side question, I noticed that the second multirow doesn't have the alignment justified. Is there a way to make it?

I compile with xelatex if it matters. Thanks to everyone who will help.

  • Does "=MEDIA.PIÙ.SE" have to be in the same row as "int_criterio1;"? Is there a correlation between the enries in these two columns? – leandriis May 19 '20 at 18:24
  • @leandriis Not exactly, "=SOMMA.PIÙ.SE", "=MEDIA.PIÙ.SE" and the two below are in four different rows. "(int; int_criterio1; criterio1; etc." is only in one row as you can see in the code but it must take the four rows. Those are the MS excel italian functions for sum, avg, max, min and on the other column the parameters to use – Ripper346 May 19 '20 at 21:02
  • So basically, all four entries in the first column whare the same entry in the second column? – leandriis May 19 '20 at 21:07
  • Take this example: I have one row with SUM(1,2,3), the second row AVG(1,2,3), the third MAX(1,2,3) and the fourth MIN(1,2,3). Instead of writing always (1,2,3) that (imagine) it's a long content, I can write only SUM, AVG, MAX and MIN and then I make a separate column where I can fit all the content of (1,2,3) (imagine always that it's long) – Ripper346 May 19 '20 at 21:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.