+ Reply to Thread
Results 1 to 17 of 17

Help with daily averaging and automatically adding a worksheet copy?

  1. #1
    Registered User
    Join Date
    01-11-2017
    Location
    Chicago, IL
    MS-Off Ver
    2010
    Posts
    80

    Help with daily averaging and automatically adding a worksheet copy?

    These probably aren't particularly hard to fix, but they're beyond my abilities unfortunately. I've had help from several wonderful people on this forum in the past creating and refining this workbook that my husband uses for analysis. He wanted to make some changes to it, but I'm having trouble with 2 things:

    1. It's supposed to automatically add a new worksheet each week by making a copy of the MASTER worksheet and adding it before the PAY COMM AVE sheet. I deleted that sheet because we don't need it anymore, but that messed up adding the new weekly sheet because it can't be found in "Workbook_Open in ThisWorkbook". I believe it's done through a macro, but I don't see any though other than:

    Please Login or Register  to view this content.
    Instead of adding a new sheet, automatically named with the dates, it's overwriting the PUNCH AVE sheet.


    2. I threw off the averages by deleting some no-longer-needed columns and I'm not sure where the problem is. The PUNCH AVE and SOLD AVE sheets aren't picking up the test data I put in for Steve Junker the last 4 weeks (starting Aug 12th). The only difference is I didn't fill in numbers for Saturday, but the formulas shouldn't hinge on that. It should take the total for the week divided by how many days worked to get the daily average. The daily average columns aren't populating for any of the time periods (last 4 weeks, 3 months, 6 months, 1 year).

    Hopefully that all makes sense!
    Thanks in advance!!
    Amy
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,535

    Re: Help with daily averaging and automatically adding a worksheet copy?

    As to #2 try:
    1. For N3: =IFERROR(VLOOKUP($A3,INDIRECT("'" &N$2 &"'!A5:AJ30"),33,0),"")&"-"&IFERROR(VLOOKUP($A3,INDIRECT("'" &N$2 &"'!A5:AJ30"),32,0),"")
    2. For F3*:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    *Denotes an array entered formula which is activated by simultaneously pressing the Ctrl, Shift and Enter keys.
    I don't know anything about VBA. You may want to ask a moderator to move this thread to the VBA forum to get responses to the first part of the query.
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  3. #3
    Forum Expert
    Join Date
    09-30-2019
    Location
    Chiangmai, Thailand
    MS-Off Ver
    Office 2016, Excel 2019
    Posts
    1,234

    Re: Help with daily averaging and automatically adding a worksheet copy?

    For your #1.

    After open your .xlsm files , press Alt-F11 and navigate to 'ThisWorkbook' under Microsoft Excel Objects.
    Right-click at it , select 'View Code' and looking for
    Please Login or Register  to view this content.
    Then rename Sub name ( ie change it to xWorkbook_Open() )

    Regards.
    Last edited by menem; 10-03-2019 at 09:37 PM.

  4. #4
    Registered User
    Join Date
    01-11-2017
    Location
    Chicago, IL
    MS-Off Ver
    2010
    Posts
    80

    Re: Help with daily averaging and automatically adding a worksheet copy?

    Thank you both! Your suggestions solved both issues.

  5. #5
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,535

    Re: Help with daily averaging and automatically adding a worksheet copy?

    You're Welcome. Thank You for the feedback and for marking the thread as 'Solved'. I hope that you have a blessed day.

  6. #6
    Registered User
    Join Date
    01-11-2017
    Location
    Chicago, IL
    MS-Off Ver
    2010
    Posts
    80

    Re: Help with daily averaging and automatically adding a worksheet copy?

    Ok. Now he wants to add in 2 more worksheets for RTT-avail and Chg Time averages.

    Which part of the array formula looks at the column to pull the figures from? I see in N3 it references a column by 'counting' columns (ie column E would be 5). But I don't know how it references how many days worked that week or how it ties in with the array formula in F3. I tried to copy them to the new sheets but it's not picking up any numbers, let alone the wrong column. I'd like to know how to troubleshoot this myself so I don't have to post every time I have a small change. Thanks again.
    Attached Files Attached Files

  7. #7
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,535

    Re: Help with daily averaging and automatically adding a worksheet copy?

    I can not find an issue with the RTT Avail Ave sheet, assuming that the values in AW3:AZ3 are correct. If they are not please tell us what they should be and why.
    As far as the Chg Time Ave sheet I believe that the problem is with the formula in N3. That formula needs to reference all of the columns in the weekly sheets (A:AJ)
    If I understand correctly the first number should be the Chg Time (column AH) and the second the RTT Avail (column AF)
    So the formula should read: =IFERROR(VLOOKUP($A3,INDIRECT("'" &N$2 &"'!A5:AJ30"),34,0),"")&"-"&IFERROR(VLOOKUP($A3,INDIRECT("'" &N$2 &"'!A5:AJ30"),32,0),"")
    If I am wrong about the values that are expected for N3 and to the right, then please tell us what numbers you would expect to see in cell N3 so we can attempt to make a correction to the formula.
    Let us know if you have any questions.
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    01-11-2017
    Location
    Chicago, IL
    MS-Off Ver
    2010
    Posts
    80

    Re: Help with daily averaging and automatically adding a worksheet copy?

    You're right. I'm not sure why it wasn't showing correctly while I had it open. I have all 4 averages sheets working now, and I can see where it's pulling from the weekly totals from N3 and on. Thank you again!!

  9. #9
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,535

    Re: Help with daily averaging and automatically adding a worksheet copy?

    You're Welcome and thank you for the feedback. I hope that you have a blessed day.

  10. #10
    Registered User
    Join Date
    01-11-2017
    Location
    Chicago, IL
    MS-Off Ver
    2010
    Posts
    80

    Re: Help with daily averaging and automatically adding a worksheet copy?

    This workbook has been great the last few years. My husband would like to start tracking a few new averages, and I want to make sure all 6 of the AVE sheets are pulling the right numbers. Can someone please take a quick look and adjust the formulas if necessary? Thanks in advance!!!
    Attached Files Attached Files

  11. #11
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,535

    Re: Help with daily averaging and automatically adding a worksheet copy?

    Comparing to the previous file I believe that I have put the correct column numbers in the formulas for each week.
    Example for PRO AVE sheet, cell M3 and to the right are populated using:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    I suggest confirming that cells for the four weeks ending 1/9/2022 on each yellow highlighted sheet are displaying the expected values and that E3:F3 are also yielding the expected result.
    Let us know if you have any questions.
    Attached Files Attached Files
    Last edited by JeteMc; 01-11-2022 at 11:24 AM. Reason: Added file

  12. #12
    Registered User
    Join Date
    01-11-2017
    Location
    Chicago, IL
    MS-Off Ver
    2010
    Posts
    80

    Re: Help with daily averaging and automatically adding a worksheet copy?

    Thanks again JeteMc! I put in sample info for the last four weeks and the first 4 AVE sheets look good.
    For the EFF AVE sheet, it should show a 4-week daily ave. of 114%, and I need to take out the TTL columns.
    For the PRO AVE sheet, the 4-week daily average should be 100%, and I also need to delete the TTL columns.
    Thank you in advance!
    Attached Files Attached Files

  13. #13
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,535

    Re: Help with daily averaging and automatically adding a worksheet copy?

    On the EFF AVE sheet are the values in AJ3:AN3 correct?
    Where are the TTL columns?
    Same questions concerning the PRO AVE sheet.

  14. #14
    Registered User
    Join Date
    01-11-2017
    Location
    Chicago, IL
    MS-Off Ver
    2010
    Posts
    80

    Re: Help with daily averaging and automatically adding a worksheet copy?

    Sorry I didn't explain that clearly.
    For EFF AVE: AJ3:AN3 are correct (1.14 ave for each week, in decimal form). E3 should be 114%. Columns F, H, J, and L should be deleted.
    For PRO AVE: AJ3:AN3 are correct (1.0 ave for each week, in decimal form). E3 should be 100%. Columns F, H, J, and L should be deleted.

  15. #15
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,535

    Re: Help with daily averaging and automatically adding a worksheet copy?

    I feel that I understand.
    It would seem that there is no need for the number to the right of the dash on these sheets so the formulas for columns I and to the right could be:
    EFF AVE sheet: =IFERROR(ROUND(VLOOKUP($A3,INDIRECT("'" &I$2 &"'!A5:AR30"),43,0),2),"")
    PRO AVE sheet: =IFERROR(ROUND(VLOOKUP($A3,INDIRECT("'" &I$2 &"'!A5:AR30"),44,0),2),"")
    Formula for cell E3 on both sheets: =IFERROR(SUM(OFFSET(H3,0,MATCH($B$1,$I$1:$WF$1,1)-1,1,-4)),0)/4
    Note that these are regular formulas which may be activated by pressing the Enter key.
    Let us know if you have any questions.
    Attached Files Attached Files

  16. #16
    Registered User
    Join Date
    01-11-2017
    Location
    Chicago, IL
    MS-Off Ver
    2010
    Posts
    80

    Re: Help with daily averaging and automatically adding a worksheet copy?

    Yes! That's exactly what I needed. It doesn't need to be divided by the number of days worked. I'm all set now! Thank you again SO much. You're amazing.

  17. #17
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,535

    Re: Help with daily averaging and automatically adding a worksheet copy?

    You're Welcome. Thank You for the feedback and for marking the thread as 'Solved'. I hope that you have a blessed day.

+ 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. Replies: 7
    Last Post: 08-01-2016, 10:06 PM
  2. [SOLVED] I need daily figures from 5 sheets adding together and automatically populate weekly sheet
    By Philm1971 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 07-22-2015, 07:07 AM
  3. [SOLVED] Daily data automatically totaled in new sheet without dragging / re-adding.
    By Nerfmagnet in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-23-2013, 02:31 PM
  4. Automatically daily Adding or remove value from the excel sheet
    By Maher alsabe in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 02-15-2013, 05:18 AM
  5. [SOLVED] Automatically Autosave a worksheet daily
    By Epscan in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-04-2012, 05:09 PM
  6. Automatically Save and Copy Values Daily with a Date Stamp
    By cckal in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 01-10-2010, 05:36 PM
  7. How to add Accumilative + daily cost value from the previous worksheet automatically
    By uaeXXuae in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-09-2009, 08:55 AM

Tags for this Thread

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