M
Matt_hull1979
I have a spreadsheet where I am trying to sum the totals month on month
depending on which month it is (i.e. as it is now August, I only want to sum
up to August and no further) I have begun my formula:
=IF($AF$1>$AB$2,SUM(F4:AC4),IF($AF$1>$Z$2,SUM(F4:AA4),IF($AF$1>$X$2,SUM(F4:Y4),IF($AF$1>$V$2,SUM(F4:W4),IF($AF$1>$T$2,SUM(F4:U4),IF($AF$1>$R$2,SUM(F4:S4),IF($AF$1>$P$2,SUM(F4:Q4),0)))))))
$AB$2, $Z$2, etc. are the month/year (they are all 2 cells merged starting
from F2)
$AF$1 contains the formula "=TODAY()"
$F$4:$AC$4 is the sum of April to March, $F$4:$AA$4 is April to February etc.
The example above works fine - working back from March to September.
However, when I get to August and type this:
=IF($AF$1>$AB$2,SUM(F4:AC4),IF($AF$1>$Z$2,SUM(F4:AA4),IF($AF$1>$X$2,SUM(F4:Y4),IF($AF$1>$V$2,SUM(F4:W4),IF($AF$1>$T$2,SUM(F4:U4),IF($AF$1>$R$2,SUM(F4:S4),IF($AF$1>$P$2,SUM(F4:Q4),IF($AF$1>$N$2,SUM(F4:O4),0))))))))
I get an error on the final sum, SUM(F4:04).
Am I being really thick? Is there an easier way of doing it?
Many thanks in advance.
depending on which month it is (i.e. as it is now August, I only want to sum
up to August and no further) I have begun my formula:
=IF($AF$1>$AB$2,SUM(F4:AC4),IF($AF$1>$Z$2,SUM(F4:AA4),IF($AF$1>$X$2,SUM(F4:Y4),IF($AF$1>$V$2,SUM(F4:W4),IF($AF$1>$T$2,SUM(F4:U4),IF($AF$1>$R$2,SUM(F4:S4),IF($AF$1>$P$2,SUM(F4:Q4),0)))))))
$AB$2, $Z$2, etc. are the month/year (they are all 2 cells merged starting
from F2)
$AF$1 contains the formula "=TODAY()"
$F$4:$AC$4 is the sum of April to March, $F$4:$AA$4 is April to February etc.
The example above works fine - working back from March to September.
However, when I get to August and type this:
=IF($AF$1>$AB$2,SUM(F4:AC4),IF($AF$1>$Z$2,SUM(F4:AA4),IF($AF$1>$X$2,SUM(F4:Y4),IF($AF$1>$V$2,SUM(F4:W4),IF($AF$1>$T$2,SUM(F4:U4),IF($AF$1>$R$2,SUM(F4:S4),IF($AF$1>$P$2,SUM(F4:Q4),IF($AF$1>$N$2,SUM(F4:O4),0))))))))
I get an error on the final sum, SUM(F4:04).
Am I being really thick? Is there an easier way of doing it?
Many thanks in advance.