+ Reply to Thread
Results 1 to 2 of 2

Formula generating problem

  1. #1
    Registered User
    Join Date
    06-21-2013
    Location
    zagreb
    MS-Off Ver
    Excel 2010
    Posts
    23

    Formula generating problem

    Hi,

    I have excel file with two sheets. In sheet one there is table for each employee that marks for each week his used days off(it says Off in cell),holidays(Holiday),extra days(Extra) and used extra days(UED). Each person gets two days off in each week. If he doesn't use one or two days off he gets extra one or two days and he can use them any time this year.

    I am trying to have cell under each employee that will tell how many holidays has he remaining(extra day can be considered as holiday). Calculation must take into consideration default number of holidays=25, used holidays, extra days and used extra days. So if employee gets extra day Holiday remaining cell should increase by one and when he uses extra day it should decrease by one.

    In sheet2 I have cells for each employee that should count used days off(used days column),holidays,extra days(Extra column) and used extra days(at the bottom of the sheet), more than 2000 cells in total. Each cell should contain formula. I have made only for employee Nenad formulas for 2nd and 3rd week. If seven days of holidays are used in one week formula should count that week as 2 used days off,7 used holidays,0 extra and 0 UED.
    In cell B5 I have formula =IF(C5=7,2,COUNTIF(Sheet1!D9:D15,"Off")) and in B6=IF(C6=7,2,COUNTIF(Sheet1!D16:D22,"Off")). I need to fill in remaining cells in that row(and every other row). How can I do that?

    I cant select B5 and B6 and drag them cause of relative addresses. If I do that formula in B7 would not become=IF(C6=7,2,COUNTIF(Sheet1!D23:D29,"Off")). I need some macro that would generate correct address in cell below(it would increase its row position by 7) and B8 should be =IF(C6=7,2,COUNTIF(Sheet1!D30:D38,"Off")).

    Does anyone knows if this will be easy to transfer to google docs. I believe they still dont support macros but if some would give the macro that I need I could just copy cells to goggle docs. Also if anyone has a better idea or smoother way how to achieve this I would appreciate it very much.

    I tried with one macro, but I deleted it so there is no macro in this file.

    Excel file attached.

    Tnx.
    Attached Files Attached Files

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Formula generating problem

    Hi,

    Unfortunately your post does not comply with Rule 1 of our Forum
    RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution.

    Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.

    To change a Title go to your first post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.

    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

+ 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. Problem with a macro generating a msgbox instruction
    By Johnb11 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-19-2014, 07:07 PM
  2. Problem while generating vloop in excel using vb 6.0
    By anavarathan in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-09-2014, 03:00 PM
  3. problem with generating new worksheet in macro and transferring values
    By benniboi in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-29-2012, 07:42 AM
  4. Generating Pivot Tables: VBA - A problem
    By ragavendraph in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-11-2012, 09:32 AM

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