+ Reply to Thread
Results 1 to 4 of 4

Help writing a complicated IF statement

  1. #1
    Registered User
    Join Date
    08-15-2013
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010
    Posts
    2

    Help writing a complicated IF statement

    Hello, hoping someone can help me

    I am trying to build a training tracker, the raw data exported from our web ePk website has the following columns:

    Employee ID, Employee Name, Course Name

    A row is only populated with completed courses, if a course has not been done you don't get a row with that person's name and ID on that possible course in the download. Here is what I need to do:

    Each employee will have their own page in the excel sheet and it will have the following columns, all the possible course names will be under the course name column.

    Course Name, Complete?

    I need to populate a "YES" in the "Complete?" column by looking at the downloaded sheet and if on the same row employee # "1234" = employee #"1234" in the download sheet AND Course Name = Course Name in the download sheet.

    Basically an IF statement that looks for two criteria that must be on the same row to be true. Is this possible?

  2. #2
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: Help writing a complicated IF statement

    Hi,

    Is this the sort of thing that you are looking for???

    Hope this helps
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    08-15-2013
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Help writing a complicated IF statement

    Oh WOW! That is exactly what I needed.

    So I know, whats going on here? Never used SUMPRODUCT before.....

    Quote Originally Posted by ajryan88 View Post
    Hi,

    Is this the sort of thing that you are looking for???

    Hope this helps

  4. #4
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: Help writing a complicated IF statement

    I'm glad that worked for you!

    OK, now for the complicated explanation:

    SUMPRODUCT will multiply the components of multiple arrays together and then add the results to give you a single answer. So in this case, I have fed 2 arrays into the formula.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    will return an array of true/false values depending on whether or not the employee ID from the downloaded data matches the current employer's ID.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    will return an array of true/false values depending on whether or not the course name from the downloaded data matches the current course. By placing the "--" in front of each of these arrays, it converts all TRUE values to 1 and all FALSE values to 0, as SUMPRODUCT needs numbers fed into the arrays.
    Now for an example of how these arrays will be treated by SUMPRODUCT, consider these 2 simple arrays: {1,2,3} and {10,11,12}. SUMPRODUCT will give an answer of
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Hopefully you can see now that the results of the SUMPRODUCT on the workbook will either be 1 if an emplyee ID AND a course name match, or 0 if there are no matches. Hence the conditions of the IF formula that I used to return the desired result.

    I'm sorry if this is still a bit unclear to you, I never was a good teacher, I just knew how to do stuff!

    Please don't forget to mark this thread as solved and click the * next to my post to say thanks

    Have a great day!

+ 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. Complicated If/And/Or statement
    By Tideronthestorm in forum Excel General
    Replies: 4
    Last Post: 12-04-2012, 12:54 PM
  2. Complicated IF/SUM formula. Need some help with writing it.
    By DannyJ in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 09-26-2012, 01:12 PM
  3. HELP! Complicated IF-Then statement needed
    By Moroco in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-21-2012, 01:37 AM
  4. Need If, then statement - kind of complicated
    By MidCon in forum Access Programming / VBA / Macros
    Replies: 2
    Last Post: 05-13-2009, 12:39 PM
  5. Complicated If statement?
    By aposatsk in forum Excel General
    Replies: 0
    Last Post: 08-03-2006, 01:50 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