+ Reply to Thread
Results 1 to 10 of 10

Average Sales Using Changing Cell for ISO Week

  1. #1
    Registered User
    Join Date
    02-23-2011
    Location
    Phoenix
    MS-Off Ver
    Excel 2003
    Posts
    13

    Average Sales Using Changing Cell for ISO Week

    Hi Everyone,

    I am a newb in excel and try my best but this one I cannot figure out. I have a sheet where F6 is my input cell for the week number. By that number it will grab data from the input data sheet and give me for that week what the sales were for each day of that week Mon-Fri. This part works great. The problem is trying to find a formula for the weekly average. What I currently have works grreat as long as the number in F6 is in the current week and my weekly average works, but if a prior week is put in F6 then my weekly average is not valid. As the total sales is adding everything from the input data sheet.

    I need a formula for total sales so if a prior week is inputted into F6 then it will total only those numbers up to that week minus the current sales for the week that is in F6. I hope this is making sense.

    I have attached a sample file.

    Test_Sales.xls

    I am thinking maybe I might need some VBA code to do this calculation depending on the variable in F6. Can anyone help on this please? Thank you.
    Last edited by ssnooze; 05-02-2012 at 02:01 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Average Sales Using Changing Cell for ISO Week

    When you say
    if a prior week is inputted into F6 then it will total only those numbers up to that week minus the current sales for the week that is in F6
    do you mean current week is actually today's week (as in week of May 2, 2012)?
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    02-23-2011
    Location
    Phoenix
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Average Sales Using Changing Cell for ISO Week

    Yes current week would mean today's week which would be iso week 18. But the weeks I have in my test sheet are for iso weeks 1,2,3,4,5,9,and 10 for testing.

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Average Sales Using Changing Cell for ISO Week

    Try:

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    02-23-2011
    Location
    Phoenix
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Average Sales Using Changing Cell for ISO Week

    Is this for finding the total sales up to the number in F6? It isn't working when the week number in F6 is changed.

    So if F6 has a prior number of 6 then the total sales should add sales for weeks 1,2,3,4,5, and 6. And when the number in F6 is changed to current week of 10 then the total sales should add up all the weeks up to 10. The same for any prior week that is entered.

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Average Sales Using Changing Cell for ISO Week

    Then is it?
    =SUMIF(Sheet2!$E$2:$E$23,"<="&F6,Sheet2!$D$2:$D$23)

  7. #7
    Registered User
    Join Date
    02-23-2011
    Location
    Phoenix
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Average Sales Using Changing Cell for ISO Week

    AWSOME NBVC!!! It is working great! Wow is seems so simple, this is when I wish I understood more in excel. Can you tell me what the & is doing in the formula?

  8. #8
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Average Sales Using Changing Cell for ISO Week

    I guess I had misunderstood originally... glad it worked now.

    The & means concatenation... we are concatenating the number found in F6 to the <= to form the argument... Sumif checks are criteria range for a specified criteria (that argument) and return the sum of the sum range where that criteria was met.

  9. #9
    Registered User
    Join Date
    02-23-2011
    Location
    Phoenix
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Average Sales Using Changing Cell for ISO Week

    So if I am understanding by using concatenation it is then finding all numbers that are less then or equal to the original number and summing the criteria? I know I am basically saying the same thing you did but it just helps me to understand.

    Thank you so much NBVC!!

  10. #10
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Average Sales Using Changing Cell for ISO Week

    Yes... pretty much....

    Check Sumif help for more examples....

+ 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