+ Reply to Thread
Results 1 to 4 of 4

Double if statement??

  1. #1
    Registered User
    Join Date
    07-09-2007
    Location
    Houston
    MS-Off Ver
    2016
    Posts
    60

    Double if statement??

    I am not sure it I need to use an if statement or what but I need to return a cell if 2 criteria are true.

    What I have is a database with a long list of names and workorder numbers next to the name along with a lot of other data asociated with that person on that workorder. it is possible for one person to do work under different workorders so keep that in mind. on a different tab I have a sheet with a dropdown to select the workorder and then I have a function that brings in all names associated with that workorder. now I need to write a function saying that if this person worked on this workorder return the number of hours he worked on that particular workorder. That information is on the original database tab. I need to do all of this with functions because I am trying to keep it automated for the Administrators that are keying the data.

    Would this be a double if statement.

    FYI I tried this already:
    =SUM(('Mon WS'!E3:E450=Monday!C17)*('Mon WS'!D3:D450=Monday!$D$9)*('Mon WS'!H3:H450))

    Here I was trying to do sum((name=name)*(workorder=workorder)*(hours) but it is returning 0. also there may be an instance where I need to return a word and not a value. any help would be great.

  2. #2
    Registered User
    Join Date
    07-09-2007
    Location
    Houston
    MS-Off Ver
    2016
    Posts
    60
    ok nevermind it works for hours worked. I forgot to enter it as an Aray however how would you make it work for returning a text as oppose to a value
    Last edited by txbullets; 08-05-2008 at 07:44 PM.

  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    If you're only expecting one match then you can use this formula or similar to return numbers or text

    =LOOKUP(2,1/(('Mon WS'!E3:E450=Monday!C17)*('Mon WS'!D3:D450=Monday!$D$9)),'Mon WS'!H3:H450)

  4. #4
    Registered User
    Join Date
    07-09-2007
    Location
    Houston
    MS-Off Ver
    2016
    Posts
    60
    thank you that worked great!!!

+ 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