+ Reply to Thread
Results 1 to 3 of 3

Conditional Sums based on data entry

  1. #1
    Registered User
    Join Date
    04-25-2012
    Location
    South Africa
    MS-Off Ver
    Excel 2010
    Posts
    9

    Question Conditional Sums based on data entry

    First of all hello everyone, I'm new here. I'm based in sunny South Africa, I hope I will not only ask questions, but also be of some use here!

    Ok so here's my problem: I am working on a yearly budget worksheet and have solved the problem I have, but I just know there must be an easier way of getting the same result! Please advise if you know of a better way!?

    The budget I work on is for our financial year (April to March) and looks exactly the same for every year, except of course for the sales turnover entries which differs. It allows entry of sales turnover for each specified product group per month.
    Budget for last fiscal year:
    budget_ly.JPG

    New budget for current fiscal year:
    budget.JPG

    As you can see above, there are 7 product groups plus an export group for each month. Let me run you through a little more detail. Result 11/12 is total turnover over the financial year per group. Plan is the new budget for the new year. Next is just the percentage increase from previous year. The data for each month is retrieved manually from third party software and then entered. Let me please just finish off with what calc's are happening on the right of month columns. To Date is just a sum of all entries within the specific row. "S.P.L.Y." is where my problem lies, it basically means Same Period Last Year and what I want it to do is see if there is any data in the appropriate month and if so count how many months. It should then go to the previous year's budget and count off the same number of months and do a sum of the result. In other words if there is data entries on April and May, it should go to the previous year's sheet and sum the previous year's sales turnover for April and May so that the two can be compared. The next column (LY%) basically then reports the difference in percentage between the two year's results. The %Plan column checks the result year to date against where we should be compared to our plan/12*number of months we are into the fiscal year. The last column just reports our result to the overall plan of the year.

    So to get the function in the "SPLY" column to work, what I have done is use the counta function. I had to do this for the first 6 months and the again separately for the last 6 months. The reason I had to do this twice is as follows. If memory serves me right we can only use nested ifs a total of 7 times? So I split the first six months and then again for the second half of the year. So the current setup is just that it count every month that has a value entered and then I have a nested if formula that says if the value is "1", go to the previous budget and get the value for just the first month, if the value is "2" then go to the previous month and sum the first two month's values ect ect and so on and so on. The same of course for the second half of the year and then sum the first half and the second half of the year and that is my answer. I hope it makes sense? The problem I have is that it a lot of extra columns used for this calculations and formulas (which I will hide), but surely there is a better way of doing this?

    Here is the budget book..

    Budget1213_2.xlsx

    You will see all these "extra" formulas next to the budget on the right hand side. Incidentally you will see there is a factor of 0.975 which we deduct of the values on the monthly row totals to allow for settlement discounts and/or other deductions.

    Please could you point me in the right direction? Thank you kindly!

  2. #2
    Valued Forum Contributor mohd9876's Avatar
    Join Date
    05-04-2011
    Location
    Amman, Jordan
    MS-Off Ver
    Excel 2010
    Posts
    426

    Re: Conditional Sums based on data entry

    try this formula in R2 copied down:
    =SUMPRODUCT((E2:P2<>"")*('11_12'!E2:P2<>"")*'11_12'!E2:P2)*0.975

  3. #3
    Registered User
    Join Date
    04-25-2012
    Location
    South Africa
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Conditional Sums based on data entry

    Good grief... Thank you very much mohd9876. I would have to admit I flinched when I saw your brilliantly simple yet effective reply. Made me look like a right numbty, but I suppose that is how we all learn. I will mark the thread as "solved", once again thank you very much mate. Would you know if there is a way of instead of referring to the actual worksheet name of the previous year (e.g.: 11_12 ect ect), to rather refer to just the previous worksheet, or the next worksheet to the right? Otherwise I would have to change the formula every year when I go into the new fiscal year?

+ 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