+ Reply to Thread
Results 1 to 2 of 2

Multiple criteria sum to calculate total amount per annum"

  1. #1
    Registered User
    Join Date
    10-27-2010
    Location
    Kuala Lumpur, Malaysia
    MS-Off Ver
    Excel 2003
    Posts
    1

    Question Multiple criteria sum to calculate total amount per annum"

    Background
    - I am using Excel 2003
    - The data is organized in Table format (500 rows x N column),
    1st column is the ending date of each month
    2nd column is the year of the date in 1st column
    2nd column is sale per month
    3rd column is expense per month

    I use sumproduct function to calculate the Total Amount for each item in the Table as set out below
    '=IF(ISERROR(SUMPRODUCT(--(rng_colltrlDates<=gbl_SecEndDate),--(rng_colltrlDates>=gbl_OrigDate),--(rng_colltrlYear=D$5),PLTax.EIR.IntlMrtgEIRincome)),"error",SUMPRODUCT(--(rng_colltrlDates<=gbl_SecEndDate),--(rng_colltrlDates>=gbl_OrigDate),--(rng_colltrlYear=D$5),PLTax.EIR.IntlMrtgEIRincome))

    Goals
    I am thinking of doing the above calculation in vba by using user defined function. This is :
    1) to make the spreadsheet looks neater and the formula is less intimating.
    2) to handle the error in vba and
    3) to make the calculation speed will be faster.

    Thanks in advance for your guidance.

  2. #2
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: Multiple criteria sum to calculate total amount per annum"

    Hi and welcome to the board
    Maybe a Pivot Table would help. No VBA needed, neat and easy to use.
    Maybe post a small sample of your data

+ 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