+ Reply to Thread
Results 1 to 7 of 7

Vacant Units - Multiple Entries but only showing on status for most recent entry

  1. #1
    Registered User
    Join Date
    12-19-2013
    Location
    Cambodai
    MS-Off Ver
    Excel 2007
    Posts
    3

    Lightbulb Vacant Units - Multiple Entries but only showing on status for most recent entry

    I have a rental spread sheet for a hotel which I use to input new guests etc. This sheet keeps track of all tenants since I started the record.
    I am having trouble being able to list all the occupied and vacant units - vacant units being the problem.
    Its not too difficult to change the status to Occupied or Vacant, but if I choose VACANT on the filter I get all the people who stayed in that unit even months back.
    I'm only interested in listing all the occupied and most recent vacant units.

    =IF(AND(G43<$F$9,H43<$F$9),"Vacant","Occupied")
    $F$9 is TODAY()
    G43 is check in date
    H43 is check out date
    Attached Files Attached Files
    Last edited by SamuraiEd; 12-19-2013 at 10:30 PM.

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Vacant Units - Multiple Entries but only showing on status for most recent entry

    I'd need to see a sample spreadsheet to see where your data is coming from. Your unit would be vacant if the latest check out date is > than latest check in date or if the number of check in dates = the number of check out dates. I can't help you with the information you've given. I'd need to see how your data is set up (Go Advanced> Manage Attachments)
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Registered User
    Join Date
    12-19-2013
    Location
    Cambodai
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Vacant Units - Multiple Entries but only showing on status for most recent entry

    Thanks for taking the time to have a look at this. I've uploaded a sample file.

  4. #4
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Vacant Units - Multiple Entries but only showing on status for most recent entry

    Okay, I created a separate list (on a separate sheet) of the current status of all units.

    First, are you sure of this formula in Col B?
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    I would think you'd want it to Occupied if person is checking in on that day but vacant if checking out on that day so should be
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Anyway, with a list of all your units, starting in A2
    in B2 copied down
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Basically if there are any occurrences of the unit being occupied on the date in U3, then it is occupied on that date, otherwise it is vacant.
    Does this work for you?
    Attached Files Attached Files

  5. #5
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Vacant Units - Multiple Entries but only showing on status for most recent entry

    Oh, I converted all your units to Numbers (you had made those less than 100 into text so you could prefix them with a zero). I used custom number format to place the 0 in front of the units less than 100.

  6. #6
    Registered User
    Join Date
    12-19-2013
    Location
    Cambodai
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Vacant Units - Multiple Entries but only showing on status for most recent entry

    Thanks for the change in converting the text to numbers.

    you are quite right on your point about my B column formula, im guilty of rushing it when creating the sample sheet.

    For your formula that you put on the separate sheet, it seems to work well except that in the case (eg. 102) where it is occupied now and in the future, then it takes whichever one is listed on top.

  7. #7
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Vacant Units - Multiple Entries but only showing on status for most recent entry

    Okay, 102 is occupied from Sept 28 to Dec 28th. Why would you not want that one listed?

+ 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. Data Validation: Remove only one entry of multiple entries in list
    By elmerg in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-13-2013, 04:45 PM
  2. Replies: 1
    Last Post: 07-25-2012, 07:44 AM
  3. Single data entry cell for a range of cells from most to least recent entries?
    By orange108 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-26-2011, 01:10 PM
  4. Search Column - Find Multiple Entries - Sum Then Delete to Single Entry
    By Ledge in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-19-2006, 03:30 PM
  5. Replies: 1
    Last Post: 06-01-2006, 01:15 PM

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