+ Reply to Thread
Results 1 to 2 of 2

Capture and calculate data based on work week in VBA or formulas

  1. #1
    Forum Contributor
    Join Date
    07-17-2011
    Location
    PH
    MS-Off Ver
    Excel 2007
    Posts
    183

    Capture and calculate data based on work week in VBA or formulas

    Hi,

    I have a requirements to capture the data and calculate the qty based on the defined work week. May i request your assistance or
    idea on how to to this in vba macro or a formulas. I'll giving a sample data as reference. In my sample data i have already the formulas
    but i wanted to automate the work week calculation specially if the number of days in a month has been change. thank you in advance.

    btw, the values of every column is came from other worksheet. i copy paste this data as my sample.

    For ex.

    Today is July and it has 31 days, the 31 days will be distributed to the defined workweek and
    calculate the contents of the coresponding column.

    here is the distribution of columns per week as reference.
    (31 days)
    wk1 - Day1 to Day8 (8 colums)
    wk2 - Day9 to Day16 (8 colums)
    wk3 - Day17 to Day24 (8)
    wk4 - Day25 to day 31 (7) columns

    (30 days)
    wk1 - Day1 to Day8 (8 colums)
    wk2 - Day9 to Day16 (8 colums)
    wk3 - Day17 to Day23 (7)
    wk4 - Day23 to day 30 (7) columns
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    07-17-2011
    Location
    PH
    MS-Off Ver
    Excel 2007
    Posts
    183

    Re: Capture and calculate data based on work week in VBA or formulas

    So far i have tried this approach to breakdown the days and capture the contents corresponding column for a certain week based on the number of days. Facor if this can be doable in VBA macro. Also my concern if the records added to the rows i also wanted to automatically to adjust the rows if theres a new records from column A to AH. thanks.

    WK1=IF(AW1=31,ABS(IFERROR(SUM(C30:J30)/AO30-25%,0)),IF(AW1=30,ABS(IFERROR(SUM(C30:J30)/AO30-25%,0))))
    WK2=IF(AW1=31,ABS(IFERROR(SUM(K30:R30)/AO30-25%,0)),IF(AW1=30,ABS(IFERROR(SUM(K30:R30)/AO30-25%,0))))
    WK3=IF(AW1=31,ABS(IFERROR(SUM(S30:Z30)/AO30-25%,0)),IF(AW1=30,ABS(IFERROR(SUM(S30:Y30)/AO30-25%,0))))
    WK4=IF(AW1=31,ABS(IFERROR(SUM(AA30:AG30)/AO30-25%,0)),IF(AW1=30,ABS(IFERROR(SUM(Z30:AF30)/AO30-25%,0))))
    Last edited by Jovillanueva; 07-22-2014 at 04:31 AM.

+ 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: 6
    Last Post: 05-16-2014, 11:30 AM
  2. Replies: 5
    Last Post: 09-25-2013, 01:48 PM
  3. [SOLVED] Calculate YTD based on week selected
    By Aland2929 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-14-2012, 08:51 AM
  4. Replies: 5
    Last Post: 06-24-2010, 06:21 AM
  5. [SOLVED] [SOLVED] How to Calculate a Projected Finish Date based on Work Week and Holidays
    By mojado44 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-15-2005, 09:10 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