Hi Mark,
If you fix the month number in cell A1, this formula i quite easy to explain:
=IF(A1=1,0,INDIRECT("tab"&A1-1&"!J10"))
the "&"-sign concatinates "tab" with "A1-1" with "!J10"
Assume you are in May, i.e. month 5 (means Cell A1 = 5).
then "A1-1" would give the number 5-1 = 4
which means that "tab"&A1-1&"!J10" would turn in "tab4!J10".
If you just look at that short formula (=tab4!J10) it is of course just a cell reference to cell J10 in the "tab4". This formula is in this example located in "tab5". J10 in tab4 is the sum you want to bring along to from April to May.
The INDIRECT function, converts "a text formula" into a cell reference.
This means that the formula above will look like this to Excel:
=IF(A1=1,0,tab4!J10)
and for all months where the month number is not 1 (January), the result will be: =tabXX!J10 which is the reference to "previous month" (= XX) which you would like to have. Month number "1" must of course give the result zero, since "previous month" is not defined.
What the whole function above does is actually only calculating the name (number) of the previous tab and then refer to cell J10 in that tab. If you are in "tab9" the result of the formula will be "=tab8!J10"
Kind regards
Bjorn