+ Reply to Thread
Results 1 to 6 of 6

Formula help - return value based on 2 cell values

  1. #1
    Registered User
    Join Date
    06-05-2018
    Location
    swindon
    MS-Off Ver
    2016
    Posts
    2

    Formula help - return value based on 2 cell values

    Hi guys,

    sorry if the title doesn't really give you a good overview of the issue...

    I basically am trying to create an in/out system in excel.

    When we give out access cards to people, they are logged on a spreadsheet then updated when they return them.

    Capture.PNG

    Based on the above image, there are 2 conditions to know the card is with us and ready to give out again:
    1) The cell colour is green
    2) The "Actual Return" is filled in.

    So for example badge 1,5 are all in and 2,3,4,6,7 are out.

    So in theory, I want a table to display the below:

    Badge 1 | IN
    Badge 2 | OUT
    Badge 3 | OUT
    Badge 4 | OUT
    Badge 5 | IN
    Badge 6 | OUT
    Badge 7 | IN

    Can someone help me with a formula to do the above please?

    Thanks,
    Dan

  2. #2
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,496

    Re: Formula help - return value based on 2 cell values

    this would be one way...
    =IF(AND(B4<>"",C4<>""),"IN","OUT")
    dragged down
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  3. #3
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,496

    Re: Formula help - return value based on 2 cell values

    but if you want it EXACTLY as you wrote the results then this...
    =IF(AND(B4<>"",C4<>""),"Badge | "&A4&" IN","Badge | "&A4&" OUT")

    Oh and by the way, mine should reference L and M instead of B and C.
    Last edited by Sam Capricci; 06-05-2018 at 07:40 AM.

  4. #4
    Forum Expert PaulM100's Avatar
    Join Date
    10-09-2017
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    2,108

    Re: Formula help - return value based on 2 cell values

    I think that you can only reference the interior color of a cell via VBA. Uploading a sample and explaining the rules behind the green colour may help.

    To attach a file, click Go Advanced below the text edit window, scroll down and click the Manage Attachments link, browse to the required file, and then push the Upload button, then Close Window to return to your post. (The "paper clip" icon for attachments is not currently working.)

  5. #5
    Registered User
    Join Date
    06-05-2018
    Location
    swindon
    MS-Off Ver
    2016
    Posts
    2

    Re: Formula help - return value based on 2 cell values

    Hi sorry, one thing I forgot to mention was that I will have a seperate table for the IN/OUT status.

    e.g. the below:
    Capture1.PNG

    So i need a formula to look down the K column (as there will be multiple badge numbers as they get signed out and returned) with whatever badge number is in the Y column.

  6. #6
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Formula help - return value based on 2 cell values

    Hi Dan,

    Based on your screen capture, I would suggest something like

    =IF(COUNTIFS(K:K,A2,L:L,"<>",M:M,"")=0,"IN","OUT")

    Where A2 refers to an individual badge number in the output table.

    This should count all rows where the specified badge number has an entry (date) in column L but not in column M, which will be 1 for OUT or 0 for IN.

    This doesn't look at the cell colour, a formula is not able to distinguish that.

    Does that help?

+ 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] Formula to Return cell value based on multiple Max & Min values
    By hecgroups in forum Excel General
    Replies: 10
    Last Post: 08-27-2017, 03:08 PM
  2. [SOLVED] Return a value based on other cell values
    By Ravana in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-07-2015, 12:59 PM
  3. [SOLVED] Formula to return a values based on whether A1 is within a Range
    By joliver in forum Excel General
    Replies: 10
    Last Post: 08-05-2014, 09:04 PM
  4. Replies: 4
    Last Post: 01-16-2014, 11:00 AM
  5. need a formula to return multiple values based on cell refrance please help
    By crobledo in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-10-2013, 10:16 PM
  6. Replies: 3
    Last Post: 05-09-2012, 06:22 PM
  7. Replies: 6
    Last Post: 06-08-2010, 09:42 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