Is it possible to add text on a coloured background or a cell to the middle of a line (similar to the image)? Thank you
\documentclass[11pt,a4paper]{article}
\usepackage[table]{xcolor}
\usepackage{graphicx}
\usepackage[resetfonts]{cmap}
\usepackage{lmodern}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{multicol}
\usepackage{multirow}
\textwidth 18cm
\textheight 26cm
\hoffset -1cm
\voffset -3cm
\oddsidemargin 0cm
\evensidemargin 0cm
\def\displayskip{\vskip6pt\relax}
\def\enddisplayskip{\vskip7pt\relax}
\usepackage{tabularx}
\usepackage{booktabs}
\usepackage{bm}
\usepackage[flushleft]{threeparttable}
\usepackage{hhline}
\begin{document}
\begin{table}[h!]
\begingroup
\centering
\rowcolors{3}{white}{gray!20}
\def\arraystretch{1.4}
\begin{tabularx}{\textwidth}{|r|r|*{6}{>{\centering\arraybackslash}X|}l|}
\hline
& & \multicolumn{2}{c|}{\textbf{A}} & \multicolumn{2}{c|}{\textbf{A}} & \multicolumn{2}{c|}{\textbf{B}} & \\
\hhline{~~|------|~}
\multirow{-2}{*}{\textbf{A}} & \multirow{-2}{*}{\textbf{B}} & {\textbf{B}} & {\textbf{B}} & \textbf{other} & \textbf{A} & \textbf{A} & \textbf{A} & \multirow{-2}{*}{\textbf{B}} \\
\hline
AAAAAA & B & C & D & E & F & G & - & H \\
AAAAAA & B & C & D & E & F & G & - & H \\
\hline
AAAAAA & B & C & D & E & F & G & - & H \\
AAAAAA & B & C & D & E & F & G & - & H \\
\hline
AAAAAA & B & C & D & E & F & G & - & H \\
AAAAAA & B & C & D & E & F & G & - & H \\
\hline
\end{tabularx}
\par
\endgroup
\end{table}
\end{document}
After the advice: