Failing to combine a gantt chart with a table I now try to avoid the gantt chart by just using a tabular environment. However I like to keep some neat features of the pgfgantt-package and I'm facing some problems.

The idea

I'm creating a table with a column of row names. Then are following 24 columns of exactly equal width. In the header I use two times multicolumns of 12 columns each to get the years 2017 and 2018. Below there are 8 multicolumns of 3 columns each to model the quarters of each year. Finally I'm trying to use cellcolor
to get a kind of timebar spanning a certain amount of months. It should look like this:

I included one timebar (macro see below) which consists of 6 months which are empty, 12 months which are filled with gray and again 6 empty months.

\timebar{title}{6}{12}{6}

First problem

As my quarters all have the same width I'm actually exptecting the following MWE to work as intended. It shows different timebars with the same number of months, but shifted. But as you can see, it's mess.

What do you want to add/subtract? As long it's only integers, use \the\numexpr Number1 + Number2
– user31729Jun 7 '16 at 10:06

@ChristianHupfer Basically I want my macro to have two arguments startmonth #1 and endmonth #2 which are integer numbers. But within my macro I internally actually need three arguments: #1-1, #2-#1 and 24-#2.
– thewaywewalkJun 7 '16 at 10:08

#1 is a label name, as far as I can see from \timebar
– user31729Jun 7 '16 at 10:11

Please edit your post and specify exactly, what the desired result should be for some example combinations of Start and Endmonth
– user31729Jun 7 '16 at 10:56

@ChristianHupfer Though the current example shows the result I expect, if I change the numbers, nothing works anymore. And I don't know why. I'm working on it. I get back to you. Sorry.
– thewaywewalkJun 7 '16 at 13:16