+ Reply to Thread
Results 1 to 10 of 10

Sum values in date-range breaks down

  1. #1
    Forum Contributor
    Join Date
    07-21-2010
    Location
    Alta, Norway
    MS-Off Ver
    Excel 2003
    Posts
    119

    Sum values in date-range breaks down

    Hi,

    I am using the following formula:

    =(SUMPRODUCT((Sample!$A$3:$A$1055>=Master!$A$2)*(Historikk!$A$3:$A$1055<=Master!$B$2)*(Sample!$BP$3:$BP$1055)))/1000000

    It gives me the sum of values in Sample!, defined my date range in Master!
    I have values in 1055 rows in Sample now, and the formula works well.

    However; new rows are added daily, so i tried to use this formula
    =(SUMPRODUCT((Sample!$A$3:$A$1200>=Master!$A$2)*(Historikk!$A$3:$A$1200<=Master!$B$2)*(Sample!$BP$3:$BP$1200)))/1000000

    Now the formula breaks down, #N/A (after changing 1055 to 1200)

    Any ideas why this happens or what I can to about it?
    Would really appreciate any advice

    Gnoke
    Last edited by gnoke; 09-27-2010 at 08:45 AM.

  2. #2
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Sum values in date-range breaks down

    Do you have #N/A values below your actual data in one of the columns?
    Remember what the dormouse said
    Feed your head

  3. #3
    Forum Contributor johnjohns's Avatar
    Join Date
    11-19-2007
    Location
    Dubai, UAE
    MS-Off Ver
    2003 and 2007
    Posts
    526

    Re: Sum values in date-range breaks down

    can we see your w.book?


    rgds

    johnjohns

  4. #4
    Forum Contributor
    Join Date
    07-21-2010
    Location
    Alta, Norway
    MS-Off Ver
    Excel 2003
    Posts
    119

    Re: Sum values in date-range breaks down

    Hi and thanks for replay,

    Yes I have #N/A values below some actual data. When using the IF(ISNA(),,) I get rid of this #N/A under the actual data, but then I get error #VALUE! in the SUMPRODUCT formula

    Gnoke

  5. #5
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Sum values in date-range breaks down

    Keep the IF(ISNA...)) bit and change your SUMPRODUCT to:
    =(SUMPRODUCT((Sample!$A$3:$A$1200>=Master!$A$2)*(Historikk!$A$3:$A$1200<=Master!$B$2),Sample!$BP$3:$BP$1200))/1000000

  6. #6
    Forum Contributor
    Join Date
    07-21-2010
    Location
    Alta, Norway
    MS-Off Ver
    Excel 2003
    Posts
    119

    Re: Sum values in date-range breaks down

    Works perfectly!

    Thanks a lot romperstomper, my hero of the day

    Gnoke

  7. #7
    Forum Contributor
    Join Date
    07-21-2010
    Location
    Alta, Norway
    MS-Off Ver
    Excel 2003
    Posts
    119

    Re: Sum values in date-range breaks down

    A small issue occured here, hope you can assist me again...

    Under some of my actual data I have #VALUE!. For the particular SUMPRODUCT cell that will sum from this column the formula breaks down.

    Is there maybe a formula similar to IF(ISNA... to get rid of this under the actual data?

    The formula from you is perfect for summing the rest of the columns

    Gnoke

  8. #8
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Sum values in date-range breaks down

    Use an =IF(ISERROR(formula),0,formula) construction.

  9. #9
    Forum Contributor
    Join Date
    07-21-2010
    Location
    Alta, Norway
    MS-Off Ver
    Excel 2003
    Posts
    119

    Re: Sum values in date-range breaks down

    cant stop smiling after so quick and accurate help

    Thanks mate!

  10. #10
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Sum values in date-range breaks down

    We aim to please.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1