+ Reply to Thread
Results 1 to 5 of 5

Multiple logic test question

  1. #1
    Registered User
    Join Date
    09-05-2013
    Location
    Madrid
    MS-Off Ver
    Excel 2007
    Posts
    21

    Multiple logic test question

    Hi folks,

    I have the following problem as seen below, I need to compare column B with column C then return a value in column D based on values in column A. The logic tests are as follows:

    Logic test 1: if B2=0 and C2=0 then D2=A3 (0)
    Logic test 2: if B2=0 but C2 is an integer then D2=A4 (0,5)
    Logic test 3: if C2=0 regardless of column B then D2=A3 (0)
    Logic test 4: if B2 is an integer and C2 an integer then D2=A2 (1)

    The results are seen in the attached file.logic_tests.xlsx

    Can anybody help with a formula that combines these multiple logic tests?

    Thank you in advance.

  2. #2
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Multiple logic test question

    Maybe something like:

    =IF(C2=0,A3,IF(C2<>INT(C2),"",IF(B2=0,A4,IF(B2<>INT(B2),"",A2))))
    Last edited by ragulduy; 04-04-2014 at 09:06 AM.

  3. #3
    Valued Forum Contributor adyteo's Avatar
    Join Date
    01-10-2013
    Location
    Calgary
    MS-Off Ver
    Excel 2010
    Posts
    540

    Re: Multiple logic test question

    put this in D2:
    Please Login or Register  to view this content.
    Click on the star if you think I helped you

  4. #4
    Registered User
    Join Date
    09-24-2013
    Location
    Twin Cities, MN
    MS-Off Ver
    Excel 2010
    Posts
    91

    Re: Multiple logic test question

    Try this:

    =IF(C2=0,$A$3,IF(B2>0,$A$2,$A$4))

  5. #5
    Registered User
    Join Date
    09-05-2013
    Location
    Madrid
    MS-Off Ver
    Excel 2007
    Posts
    21

    Re: Multiple logic test question

    Minnesotaart formula worked perfectly, thanks.

    I also changed rugulduy formula to this =IF(C2=0;$A$3;IF(AND(B2=0;C2=INT(C2));$A$4;$A$2)) and it also worked.

    Thanks a lot for your generous 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] logic test AND OR
    By censura in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-12-2013, 05:48 AM
  2. Multiple logic test formulae
    By Jaime1234 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-11-2013, 12:27 PM
  3. help with a logic test
    By BAC_ana in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-25-2010, 09:45 AM
  4. Logic Test??
    By WTB in forum Excel General
    Replies: 2
    Last Post: 12-16-2009, 12:27 PM
  5. [SOLVED] logic test
    By toolman in forum Excel General
    Replies: 2
    Last Post: 10-08-2005, 09:05 AM

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