+ Reply to Thread
Results 1 to 4 of 4

Return first and last dates of occupancy

  1. #1
    Registered User
    Join Date
    07-25-2012
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2010
    Posts
    4

    Return first and last dates of occupancy

    COLUMN B4:B99 are room numbers
    ROW E3:N3 are dates
    COLUMN C4:C99 has "Gain Control" header
    COLUMN D4:D99 has "Release Control" header


    I have a BeforeDoubleClick VBA that populates a cell in the grid, indicating that room belongs to that client on that date

    Example: date range in E3:N3 is 3/31/16 to 4/9/16
    Double Click three cells in a row for a room indicates that room belongs to that client for those three days

    I would like for Gain Control and Release Control for that room to populate the first and last date of occupancy for that room

    Stumped in SeattleAttachment 425333
    Attached Images Attached Images
    Last edited by track29; 10-16-2015 at 02:56 PM.

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Return first and last dates of occupancy

    Hi there. First Date:

    =IFERROR(INDEX($E2:$N2,MATCH(TRUE,INDEX((E4:N4<>0),0),0)),"")

    Second date:

    =IFERROR(LOOKUP(2,1/($E4:$N4<>""),$E$2:$N$2),"")

    as in the attached file. You many need to adjust the ranges to suit. BtW, the attachment didn't open for me.
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Registered User
    Join Date
    07-25-2012
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Return first and last dates of occupancy

    Awesome. Thanks much. Adjusted Absolute-ne$$ of ref in First Date then copied down. Did the trick.

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Return first and last dates of occupancy

    You're welcome.... and thanks for the Rep.

+ 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. [SOLVED] problems calculating occupancy
    By Mike952 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 07-13-2015, 07:58 PM
  2. Need more help pertaining to the hotel occupancy worksheet
    By TheVodkaDude in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-06-2013, 02:30 AM
  3. Inserting function that will rank rates of occupancy
    By roadrunnerside8 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-06-2013, 01:15 PM
  4. Excel 2007 : Formula issue - Occupancy Schedule
    By dramadog in forum Excel General
    Replies: 0
    Last Post: 06-15-2012, 10:58 AM
  5. Forecasting weekday occupancy between two years
    By titushanke in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-14-2005, 08:43 AM
  6. Calculating a Building\'s Occupancy Rate at Specified Times
    By ExcelTip in forum Tips and Tutorials
    Replies: 0
    Last Post: 08-23-2005, 12:21 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