LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default Formula Error

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formula error Jithu Excel Discussion (Misc queries) 1 June 22nd 07 03:55 PM
Formula Error DavidB New Users to Excel 10 October 19th 06 06:12 AM
error with formula holyman Excel Discussion (Misc queries) 3 July 12th 06 03:37 PM
How do I replace "#N/A" error, to continue my formula w/o error? Ali Khan Excel Worksheet Functions 2 February 20th 06 03:49 PM
Formula error - IF(AND... Pasmatos Excel Discussion (Misc queries) 3 November 30th 05 12:55 AM


All times are GMT +1. The time now is 03:18 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"