+ Reply to Thread
Results 1 to 3 of 3

Complex IF function with 2 cells for logical test

  1. #1
    Registered User
    Join Date
    04-28-2010
    Location
    Texas
    MS-Off Ver
    Excel 2007
    Posts
    3

    Complex IF function with 2 cells for logical test

    Please see attachment: I was trying to do an IF function in column H where if there is a value in columns F or G >0 then it would return a 0. But if there is no value then return column E. In my attachment I have tried doing it, but it always returns #Value. I'm not sure if there is a way since it would be performing 2 different logic tests trying to return 2 different values in column H.

    EX: If I put a date in any column F or G then I want column H to show 0, but if there is no date in column F or G then I want column H to show amount in column E, in the attachment it would be $535.
    Attached Files Attached Files

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Complex IF function with 2 cells for logical test

    How about:

    Please Login or Register  to view this content.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    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,917

    Re: Complex IF function with 2 cells for logical test

    If you will be using dates in F and G...
    =IF(F3+G3>0,0,E3)
    If F and/or G might be negative (ie not dates), then use this
    =IF(AND(F3>0,G3>0),0,E3)
    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

+ 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] IF function logical test is blank
    By 2knk in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-15-2013, 11:39 PM
  2. IF function performing logical test on multiple cells
    By Omni in forum Excel - New Users/Basics
    Replies: 11
    Last Post: 12-01-2012, 01:37 AM
  3. IF function - Logical test
    By TomBP in forum Excel General
    Replies: 6
    Last Post: 04-28-2010, 06:07 AM
  4. Logical test function problem
    By VwmanTom in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-10-2008, 07:19 PM
  5. Logical test function problem
    By VwmanTom in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-09-2008, 10:58 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