+ Reply to Thread
Results 1 to 6 of 6

Two criteria, return "1"

  1. #1
    Registered User
    Join Date
    04-18-2015
    Location
    NY
    MS-Off Ver
    Mac 2011
    Posts
    13

    Two criteria, return "1"

    Hi, I am trying to return "1" if both B37 is "9AM" AND C37 is "D1".

    Thank you,
    Luke

  2. #2
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,749

    Re: Two criteria, return "1"

    is 9AM a time or TEXT ?
    if text

    =IF( AND ( B37 = "9AM", C27 = "D1" ) , 1 , "" )

    If its a TIME
    IF ( AND ( B37 = TIMEVALUE("09:00") , C27 = "D1" ) , 1 , "" )
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Registered User
    Join Date
    04-18-2015
    Location
    NY
    MS-Off Ver
    Mac 2011
    Posts
    13

    Re: Two criteria, return "1"

    Thank you! It is text. If I want to cover a range for "D1" instead of a single cell, what would the formula be? For example, the range would be C37:M42.

  4. #4
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,749

    Re: Two criteria, return "1"

    is this still just to us the formula in 1 cell?
    Whats in C37 to M42 ?
    Are you looking for any value of D1 to exist in that range

    Then
    IF( AND( Countif(C37:M42 , "D1" ) >0 , B37 = TIMEVALUE("09:00") ) , 1 , "")

    Countif(C37:M42 , "D1" ) >0
    Is counting how many times D1 appears in that range , C37 to M42 and if the count is more than zero - ie D1 exists then thats TRUE
    AND with the time in B37 , gives the result
    but not sure that is what you meant
    can you mock up a spreadsheet and expected result - see yellow banner

  5. #5
    Registered User
    Join Date
    04-18-2015
    Location
    NY
    MS-Off Ver
    Mac 2011
    Posts
    13

    Re: Two criteria, return "1"

    Thank you! Yes, I was looking for any value of D1 to exist in that range. Your formula worked perfectly, thanks again!

  6. #6
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,749

    Re: Two criteria, return "1"

    excellent
    you are welcome

+ 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: 2
    Last Post: 07-24-2017, 02:19 AM
  2. Replies: 5
    Last Post: 01-23-2014, 11:02 AM
  3. [SOLVED] Return Values in a range not equal to "" criteria. (No Blanks.)
    By acepaul in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-20-2013, 03:30 PM
  4. 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
  5. [SOLVED] Find multiple "text" criteria and return as ""Yes" in Matrix
    By bertrand82 in forum Excel General
    Replies: 11
    Last Post: 04-30-2012, 09:20 AM
  6. Replies: 3
    Last Post: 02-16-2011, 02:55 PM
  7. Replies: 0
    Last Post: 07-09-2009, 04:07 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