+ Reply to Thread
Results 1 to 7 of 7

Help with lookup formula to return "Available" or "Unavailable" based on last entry

  1. #1
    Registered User
    Join Date
    04-03-2017
    Location
    BRISTOL, ENGLAND
    MS-Off Ver
    2010
    Posts
    6

    Help with lookup formula to return "Available" or "Unavailable" based on last entry

    Hi everyone,

    I have an excel workbook that I am currently using for people who want to borrow a piece of equipment (please see attached). In the first worksheet (Status) I have a list of the equipment with individual ID numbers against each. In the second worksheet (Booking Out) I will have a list of entries of equipment booked in and out with different dates and times. I need a If and lookup formula to calculate firstly based on the Last Out Date/Time entry "Unavailable" and last In Date/Time Available and populate the Status column of the first worksheet against the correct asset ID what the current status is. Sorry if this sounds a bit confusing but I have attached the basic spreadsheet to show what I am trying to do.

    Thanks

    Antony
    Attached Files Attached Files
    Last edited by AntonyCole1979; 04-07-2017 at 12:26 PM.

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,730

    Re: Help with lookup formula to return "Available" or "Unavailable" based on last entry

    Is the logic:

    "In Date" is blank i.e not yet returned from hire : "Unavailable" otherwise is "Available" ???

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

    Re: Help with lookup formula to return "Available" or "Unavailable" based on last entry

    In E2 copied down

    =IF(COUNTIF('Booking Out'!$A$2:$A$60, A2)=COUNTIFS('Booking Out'!$A$2:$A$60, A2, 'Booking Out'!$F$2:$F$60, ">0"),"Available", "Unavailable")
    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

  4. #4
    Registered User
    Join Date
    04-03-2017
    Location
    BRISTOL, ENGLAND
    MS-Off Ver
    2010
    Posts
    6

    Re: Help with lookup formula to return "Available" or "Unavailable" based on last entry

    Hi, thanks for the reply. Yes you are correct if "In date" is blank it is not yet returned from hire

  5. #5
    Registered User
    Join Date
    04-03-2017
    Location
    BRISTOL, ENGLAND
    MS-Off Ver
    2010
    Posts
    6

    Re: Help with lookup formula to return "Available" or "Unavailable" based on last entry

    Hi, Really appreciate the help, this worked perfect! Thanks

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,381

    Re: Help with lookup formula to return "Available" or "Unavailable" based on last entry

    I'm not sure the solution given is quite enough. Consider the fact that an item of equipment might be new and not yet hired out - it won't be on the bookings sheet, so you need to account for that. Try this:

    =IFERROR(IF(COUNTIF('Booking Out'!$A$2:$A$60, A2)=COUNTIFS('Booking Out'!$A$2:$A$60, A2, 'Booking Out'!$F$2:$F$60, ">0"),"Available", "Unavailable"),"Available")
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,381

    Re: Help with lookup formula to return "Available" or "Unavailable" based on last entry

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

+ 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. Replies: 5
    Last Post: 02-05-2019, 12:03 AM
  2. [SOLVED] Column X-Ref list - Sheet1 Col A "pages", Col B:FL "Req" to Sheet2 ColA "req", ColB "page"
    By excel-card-pulled in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 04-07-2017, 09:30 AM
  3. Replies: 5
    Last Post: 01-23-2014, 11:02 AM
  4. Replies: 3
    Last Post: 04-14-2013, 11:53 PM
  5. [SOLVED] Data validation: allow entry into a cell if other three cells have "X", "Y" and "Z"?
    By RogerRangeRover in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-05-2013, 04:49 AM
  6. Return "green", "yellow" or "red" from date/age and priority ranking
    By Cantaloop in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-04-2013, 12:12 AM
  7. Replies: 3
    Last Post: 02-16-2011, 02:55 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