Consulting

Results 1 to 3 of 3

Thread: Solved: Irregular Sum

  1. #1
    VBAX Contributor
    Joined
    Nov 2007
    Posts
    144
    Location

    Solved: Irregular Sum

    See attached sheet.

    I am trying to do a SUM function to simply work out annual totals per project.

    However, not all projects ended in December, therefore, just doing a SUM of the December column is giving an false total.

    Can anyone have a look at the attached sheet and see if there is some cunning formula I can use to fix the error.

    Note: The values in cells D3:O24 are cumulative values (i.e. the last populated column for each row is the overall total for that project)

    Thanks again for any help
    Attached Files Attached Files

  2. #2
    Knowledge Base Approver VBAX Wizard p45cal's Avatar
    Joined
    Oct 2005
    Location
    Surrey UK
    Posts
    5,876
    will this do?:
    R3:
    =IFERROR(INDEX(D3:O3,MATCH(9E+99,D3:O3,1)),0)
    copied down to R24
    Then sum those values.

    If using pre xl2007, R3 should be:
    =IF(ISERROR(INDEX(D3:O3,MATCH(9E+99,D3:O3,1))),0,INDEX(D3:O3,MATCH(9E+99,D3 :O3,1)))
    p45cal
    Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.

  3. #3
    VBAX Contributor
    Joined
    Nov 2007
    Posts
    144
    Location
    Quote Originally Posted by p45cal
    will this do?:
    R3:
    =IFERROR(INDEX(D3:O3,MATCH(9E+99,D3:O3,1)),0)
    copied down to R24
    Then sum those values.

    If using pre xl2007, R3 should be:
    =IF(ISERROR(INDEX(D3:O3,MATCH(9E+99,D3:O3,1))),0,INDEX(D3:O3,MATCH(9E+99,D3 :O3,1)))
    Works perfectly p45cal, thanks very much!!

Posting Permissions

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