+ Reply to Thread
Results 1 to 16 of 16

Calculating Weeks, Weekday nights and Weekend nights

Hybrid View

  1. #1
    Registered User
    Join Date
    10-20-2010
    Location
    San Francisco, California
    MS-Off Ver
    Excel 2010
    Posts
    13

    Calculating Weeks, Weekday nights and Weekend nights

    Hello,
    I'm developing a register for a hostel, given two set of dates (check-in and check-out)
    i have to calculate the number of weekday nights(Sun-Thu) and weekend Nights (Fri-Sat),i'm really new to excel and i would appreciate any help in doing this.

    Thanks in advance,
    Av
    Last edited by bngguy; 10-26-2010 at 01:20 PM.

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,627

    Re: Calculating wkday nights and wkend nights

    Please, upload an example workbook with desired inpt and output.

  3. #3
    Registered User
    Join Date
    10-20-2010
    Location
    San Francisco, California
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: Calculating wkday nights and wkend nights

    Quote Originally Posted by zbor View Post
    Please, upload an example workbook with desired inpt and output.
    I have uploaded a demo, please let me know if this is right.
    Attached Files Attached Files
    Last edited by bngguy; 10-21-2010 at 02:14 AM.

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Calculating wkday nights and wkend nights

    From what I can tell the Demo works, no ?

    (NETWORKDAYS.INTL is exclusive to XL2010 and beyond)

  5. #5
    Registered User
    Join Date
    10-20-2010
    Location
    San Francisco, California
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: Calculating wkday nights and wkend nights

    Quote Originally Posted by DonkeyOte View Post
    From what I can tell the Demo works, no ?

    (NETWORKDAYS.INTL is exclusive to XL2010 and beyond)
    Ok but you get an idea of what i'm trying to do, i have a check-in date and check-out date, using these two dates i need to find out the number of weekday nights(SUN-THU) and number of weekend Nights(FRI-SAT).

  6. #6
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Calculating wkday nights and wkend nights

    Perhaps you could explain how the sample you posted isn't doing what you want because to me it seems to do exactly as you requested.

  7. #7
    Registered User
    Join Date
    10-20-2010
    Location
    San Francisco, California
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: Calculating Weeks, Weekday nights and Weekend nights

    I'm sorry if i offended you, i will post a new thread for the 3 week requirement.

  8. #8
    Registered User
    Join Date
    10-20-2010
    Location
    San Francisco, California
    MS-Off Ver
    Excel 2010
    Posts
    13

    Macro for Message Popup

    Hello,
    I'm developing a register for a hostel, given two set of dates (check-in and check-out), i need to have a message popup whenever the stay is exceeded by 3 weeks.I would really appreciate if you could help me out with this one:

    Please See DEMO File.

    If ((F2>3) OR ((F2 = 3) AND ((E2 >1) OR (D2>1)))) then
    MsgBox (" Stay Cannot Exceed 3 Weeks !!! ")
    End if

    Except F2,E2,D2 are all columns with 54 rows, so when the user enters the check-in date and check-out date, D2 , E2 , F2 are computed and the macro should immediately alert the user if the above conditions are met.I'm really new to VBA, if you could code the macro for me that would be great.

    Thanks
    AV
    Attached Files Attached Files

  9. #9
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Calculating Weeks, Weekday nights and Weekend nights

    @AV, as already mentioned this latest question belongs in an entirely new thread

    edit: I see you have done this: http://www.excelforum.com/excel-prog...age-popup.html

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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