+ Reply to Thread
Results 1 to 3 of 3

Two Logic tests in an IF Statement

  1. #1
    Registered User
    Join Date
    02-07-2006
    Posts
    2

    Two Logic tests in an IF Statement

    I am trying to do a formula with 2 logic rules before the true false parts.

    IF finish time(Column H) is < 8:00 and customer = BtsD (Column F)

    THEN Sum Volume(Column G) that matches two tests above.

    Any ideas, very urgent!

  2. #2
    Registered User
    Join Date
    01-05-2006
    Posts
    65
    If you are trying to sum only the values that have corresponding columns
    that meet this criteria then you need to use SUMIF or SUMPRODUCT. There
    are probably better ways but here is one way to do it:

    Create a new column, say column J and put

    =IF(AND(H1<TIME(8,0,0),F1="BtsD"),"TRUE","FALSE") and copy down

    To Sum the values in G put

    =SUMIF(J1:Jn,"TRUE",G1:Gn) where n is the bottom-most active row that
    you will need to sum and 1 is your actual starting row.

  3. #3
    Forum Expert
    Join Date
    09-09-2005
    Location
    England
    MS-Off Ver
    2007
    Posts
    1,500
    =SUMPRODUCT((F1:F122="BTsD")*(H1:H122<TIME(8,0,0)),J1:J122)

    Where your range of data is in rows 1 to 122, adjust accordingly

    Regards

    Dav

    PS Remember you are excluding 8:00, if you wish to have it included select <= instead of <

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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