Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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:A A4),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:A A4),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. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Formula error | Excel Discussion (Misc queries) | |||
Formula Error | New Users to Excel | |||
error with formula | Excel Discussion (Misc queries) | |||
How do I replace "#N/A" error, to continue my formula w/o error? | Excel Worksheet Functions | |||
Formula error - IF(AND... | Excel Discussion (Misc queries) |