+ Reply to Thread
Results 1 to 6 of 6

Trying to create an IF statement that reads the logical_test from a range

  1. #1
    Registered User
    Join Date
    03-20-2014
    Location
    Canada
    MS-Off Ver
    Excel 2013
    Posts
    1

    Question Trying to create an IF statement that reads the logical_test from a range

    Hello!

    I am trying to make an automated day planner on excel. Here is how I WANT it to work:

    1) I have a list of activities where I input the Title (B), Date (D), and Time (C).
    2) I have made a schedule with the days of the week across the top, and the time running vertically down the side.

    Currently, this formula: =IF(AND($D33=C$1,$E33=$A24,$F33=$H$33),$B33,"free") is working, but will only allow me to enter one value for Logical1 ($D33=C$1), Logical2 ($E33=$A24), and Logical3 ($F33=$H$33).

    I tried doing: =IF(AND($D33:D47=C$1,$E33:E47=$A24,$F33:E47=$H$33),$B33:B47,"free") , but it shows up as #VALUE!
    I also tried: =VLOOKUP(AND(D1,A24,H33),B33:F47,1,FALSE) but it shows up as #N/A although the conditions would have been met


    HELLLPPP!!
    Last edited by kaleahbaker09; 03-20-2014 at 03:29 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    02-09-2006
    Location
    Melbourne, Australia
    MS-Off Ver
    Office 2016
    Posts
    1,075

    Re: Trying to create an IF statement that reads the logical_test from a range

    It would be easier to help if you could attach a copy of your workbook. Remember to remove/replace any sensitive data before uploading.
    Trish in Oz
    -------------
    A problem well defined is a puzzle half solved


    If you attach a sample of your workbook it will be easier to find a solution. Remember to remove/replace sensitive data before uploading the file. Look here if you need help with attachments:
    http://www.excelforum.com/faq.php?fa...b3_attachments

  3. #3
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: Trying to create an IF statement that reads the logical_test from a range

    Hard to get it without a worksheet, anyway try:

    =IFERROR(LOOKUP(2,1/(($D33:D47=C$1)*($E33:E47=$A24)*($F33:E47=$H$33)),$B33:B47),"free")
    Quang PT

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: Trying to create an IF statement that reads the logical_test from a range

    Hi and welcome to the forum

    hard to say without seeing any data to test on, but try entering your formula...
    =IF(AND($D33:D47=C$1,$E33:E47=$A24,$F33:E47=$H$33),$B33:B47,"free")

    as an ARRAY formula...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: Trying to create an IF statement that reads the logical_test from a range

    @Fdibbins, what to do with values found from range B33:B47? Maybe OP want to SUM them or pull them out rather than to establish a range.

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: Trying to create an IF statement that reads the logical_test from a range

    I have no idea lol, but by using ranges like that, it seemed it might work as an ARRAY...
    =IF(AND($D33:D47=C$1,$E33:E47=$A24,$F33:E47=$H$33),$B33:B47,"free")

+ 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] Understanding logical_test entry in IF statement
    By AndyL446 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-11-2013, 10:30 PM
  2. If statement using date format as logical_test
    By daveeeo in forum Excel General
    Replies: 5
    Last Post: 05-30-2010, 10:52 PM
  3. Range input parameter reads as value not object
    By jbaddley in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-18-2010, 03:16 PM
  4. Can't find logical_test for "if"statement
    By John Grossman in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-05-2005, 01:06 AM
  5. file path and range in formula which reads from a cell
    By SandyUK in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-04-2005, 04:09 AM

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