+ Reply to Thread
Results 1 to 7 of 7

Help getting averages for each person for each month

  1. #1
    Registered User
    Join Date
    02-26-2016
    Location
    UK
    MS-Off Ver
    2010, 2013
    Posts
    4

    Help getting averages for each person for each month

    I really need some help

    I have attached the Excel sheet I am working with as you can see its got the all the working days of Jan and so far for Feb, well this will grow over the 12 months all the way to end of the year.

    The problem is I need to get the average of each person figures for each month i.e.

    Person A, Jan Average, Feb Average.

    The average will be the total for the month divided by the days of that month worked (anything blank is seen as a day off).

    One of the issues is the data comes from an old AS400 system and through filtering out all the nonsense data we seem to be stuck with a blank line in each month. i.e. data is the work blank and the whole line is a blank which is easy tog et around by just -1 from the total of days calculated.

    Thing is I've already written a load of code and its all IF statements within IF statements.

    So far it can read Just January for one person and give a total and I am concerned that this is going to turn into a beast for some simple figures.

    The biggest issues is that this is updated and sent to managers and directors daily so its needs to be less of a daily chore to update the figures.

    Does anyone one have any simpler ideas as to achieve this without what currently appears to be 100s of lines of VBA.

    There is one thing, it maybe that more staff could come and work in a year so they would need adding to the sheet of data if needed so be another column header and figures to work with.

    I hope you guru's have some good advice.

    KR

    Kevin
    Attached Files Attached Files

  2. #2
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: Help getting averages for each person for each month

    The data you have shown on Sheet1 seems to be already pivoted. Do you get the data in the same format?
    Since you are using versions 2010 and 2013, you may consider the Power Query and PowerPviot to get this done.
    Once you have a normalized data set, you may pivot that data according to your requirement.
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,879

    Re: Help getting averages for each person for each month

    I would do the following.

    At the side of your table, I would create 12 formulas (one for each month) for each employee using the following and adapting for the criteria for each month.

    Make sure to include enough lines to capture 365 days. This will ignore blanks.

    =AVERAGEIFS(B5:B48,$A$5:$A$48,">="&DATE(2016,1,1),$A$5:$A$48,"<="&DATE(2016,1,31))
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,523

    Re: Help getting averages for each person for each month

    VBA
    Please Login or Register  to view this content.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    02-26-2016
    Location
    UK
    MS-Off Ver
    2010, 2013
    Posts
    4

    Re: Help getting averages for each person for each month

    Brilliant thank you Jindon worked a treat.

  6. #6
    Registered User
    Join Date
    02-26-2016
    Location
    UK
    MS-Off Ver
    2010, 2013
    Posts
    4

    Re: Help getting averages for each person for each month

    Thank you went with the Jindon code in the end but its great there are so many different ways I didn't even know.

  7. #7
    Registered User
    Join Date
    02-26-2016
    Location
    UK
    MS-Off Ver
    2010, 2013
    Posts
    4

    Re: Help getting averages for each person for each month

    Thank you Alan this did work too but decided to use the VBA in the end as it fitted the job better for automation.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Activity each month per person or weather chart
    By itshewe in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 01-23-2016, 09:56 PM
  2. Check for value on a by person by month basis.
    By MRHF in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-12-2015, 01:58 PM
  3. How do i use formulas to apportion wages if a person start mid month
    By Lizziec3 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-15-2015, 07:20 AM
  4. [SOLVED] Automatically calculate comm per sales person in month
    By [email protected] in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-25-2015, 08:46 AM
  5. SUMIF formula needed to calculate $ for month and person
    By excelteam777 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-18-2013, 08:13 PM
  6. Calculating How Much Each Person Brings in a Month
    By Big D in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-17-2013, 11:34 AM
  7. Averages by month
    By CJ4G in forum Excel General
    Replies: 1
    Last Post: 05-16-2008, 02:02 PM

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