+ Reply to Thread
Results 1 to 3 of 3

VBA formula problem/night work hour VBA

  1. #1
    Registered User
    Join Date
    10-13-2021
    Location
    Slovakia
    MS-Off Ver
    365
    Posts
    7

    VBA formula problem/night work hour VBA

    Hi, I would you like ask to for help with my succsess. Night work start from 22:00 (10:00PM) end ending at 06:00 (06:00AM). I prepare one formula whicht calculated corectli day and night shifts but i cant implement to the macro.

    Formula to day working horus is :

    "=MAX(;MIN($J$1;IF(C2<B2;1;0)+C2-E2)-MAX(B2;$I$1))+IF(AND(C2>$I$1;B2>C2);C2-$I$1;0)"

    how I can translate it to the VBA code or how i create in VBA formulas for paste this functions to .cells(y,1)?

    thank you for help

  2. #2
    Valued Forum Contributor
    Join Date
    09-30-2018
    Location
    Vlaams Brabant Belgium
    MS-Off Ver
    365
    Posts
    456

    Re: VBA formula problem/night work hour VBA

    Make a recording and check what vba creates then alter to make it automatic

    you get (sort off)

    Please Login or Register  to view this content.
    or

    Please Login or Register  to view this content.
    Last edited by Joske920; 10-28-2021 at 06:41 AM.
    Please be as complete as possible in your asking so it may save use all the time to rework the solution because you didn't give all the requirements. If you have a layout in mind please work it out first so we can adapt our solution to it. Thanks.
    If you have been helped, maybe you could click the *

  3. #3
    Registered User
    Join Date
    10-13-2021
    Location
    Slovakia
    MS-Off Ver
    365
    Posts
    7

    Re: VBA formula problem/night work hour VBA

    Thank you very much, its working

+ 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. Missing one hour in Work rest Hour for Seafarers
    By ljumljum in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-22-2021, 09:45 AM
  2. [SOLVED] after 24 hour formula not work
    By vasc in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-24-2021, 07:25 AM
  3. Formula to work out day/night based on start and end hours
    By pritstick in forum Excel Formulas & Functions
    Replies: 26
    Last Post: 11-18-2016, 10:20 AM
  4. [SOLVED] formula with Night hours problem
    By XLalbania in forum Excel General
    Replies: 8
    Last Post: 11-07-2016, 04:52 AM
  5. Night Differential exceeding regular hour work day
    By laffcu14 in forum Excel General
    Replies: 2
    Last Post: 09-06-2016, 11:23 AM
  6. Replies: 0
    Last Post: 08-27-2010, 08:53 AM
  7. HOUR formula problem
    By lapot in forum Excel General
    Replies: 2
    Last Post: 11-15-2006, 07:17 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