+ Reply to Thread
Results 1 to 13 of 13

Lookup Help

  1. #1
    Registered User
    Join Date
    09-17-2012
    Location
    Pennsylvania
    MS-Off Ver
    Excel 2003
    Posts
    8

    Smile Lookup Help

    Hi everyone, new to this site and after looking at some of the responses, I know I'm in the right place as everyone is so knowledgable.
    I'm a casual user of Excel 2003 trying to advance my skills so have taken on a project that will allow me do so. I have been using the lookup function and it's very useful, however, I've run into a situation where I think something else is needed and I'm stuck.
    On the attached worksheet in Cell F2, I need to return a value based on the following: If Cell D2 is equal to Billable and cell E2 = Range Name Billing Departments", return the value "Y", otherwise, lookup cell B2 and if found return the value "Y" and if not found, return the value "N"
    Does this make sense? I appreciate any help you can provide and maybe in the future, I'll be able to help someone else.
    Attached Files Attached Files

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Lookup Help

    Try:

    =IF(OR(AND(D2="Billable",ISNUMBER(MATCH(E2,Billing_Departments,0))),ISNUMBER(MATCH(B2,Associates,0))),"Y","N")
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    09-17-2012
    Location
    Pennsylvania
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Lookup Help

    WOW! I didn't expect an answer so quickly. I appreciate the answer and while this resposne did in fact return answers I could use, I need to clarify my original question. I only want to retun a value of Y if cell D2 is Billable. So if D2 is billable, continue on with the rest of the equation, but if cell D2 is anything other than billable, return a value of "N".

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Lookup Help

    Try:

    =IF(D2="Billable",IF(OR(ISNUMBER(MATCH(E2,Billing_Departments,0)),ISNUMBER(MATCH(B2,Associates,0))),"Y","N"),"N")

  5. #5
    Registered User
    Join Date
    09-17-2012
    Location
    Pennsylvania
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Lookup Help

    Works perfectly. Can you explain what adding the "N" at end of this does? Trying to understand the breakdown of the formula.


    Quote Originally Posted by NBVC View Post
    Try:

    =IF(D2="Billable",IF(OR(ISNUMBER(MATCH(E2,Billing_Departments,0)),ISNUMBER(MATCH(B2,Associates,0))),"Y","N"),"N")

  6. #6
    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,933

    Re: Lookup Help

    yes or no perhaps?
    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

  7. #7
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Lookup Help

    Quote Originally Posted by vzgeekgirl View Post
    Works perfectly. Can you explain what adding the "N" at end of this does? Trying to understand the breakdown of the formula.
    The N at the end is for the first IF.. .so if D2 does not equal "Billable", the formula skips the inside IF function and immediately returns N... if D2 is Billable, then it goes to the other IF and checks for matches...

  8. #8
    Registered User
    Join Date
    09-17-2012
    Location
    Pennsylvania
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Lookup Help

    Quote Originally Posted by NBVC View Post
    The N at the end is for the first IF.. .so if D2 does not equal "Billable", the formula skips the inside IF function and immediately returns N... if D2 is Billable, then it goes to the other IF and checks for matches...
    Thanks so much for the information. That makes more sense to me than the other post - "Yes or No perhaps"
    I really appreciate your help

  9. #9
    Registered User
    Join Date
    09-17-2012
    Location
    Pennsylvania
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Lookup Help - More help Needed

    I marked this as unsolved so I could continue on with asking questions. So I woke up at 3:00 AM thinking about this and thought of another scenerio that could appear. I've attached another Excel file.
    The equation is the same as the original with one change, If D2 is billable and E2 is in the named range, return a "Y" other wise return "N". But also, if E2 isn't found in the named range, look for a match between the project and name and the same information on the billing exclusions worksheet and return a "Y" if found, otherwise return "N".

    Bottom line is I'm trying to determine what hours should be billable based on either the billing department or an exception which would be a project and name combination.
    Attached Files Attached Files
    Last edited by vzgeekgirl; 09-18-2012 at 05:01 PM. Reason: Need More Help

  10. #10
    Registered User
    Join Date
    09-24-2009
    Location
    Phila, PA
    MS-Off Ver
    Excel 2003
    Posts
    28

    Re: Lookup Help - More help Needed

    I'll be interested to see the next response as I haven't figured out how to do this (by no means am I anywhere near most of these people, they are amazing with what they know)
    Good luck

  11. #11
    Registered User
    Join Date
    09-17-2012
    Location
    Pennsylvania
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Lookup Help - More help Needed

    Moving to top to see if someone can help

  12. #12
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Lookup Help

    Sorry, I was away on a conference yesterday.....

    is this what you mean?

    Please Login or Register  to view this content.
    it will return Y if D is "Billable" and either of these are true:

    The Dept is found in the Billing_Departments range.
    The Name is found in Associates range
    The combination of Project and Name is found in the Project/Associate range.

  13. #13
    Registered User
    Join Date
    09-17-2012
    Location
    Pennsylvania
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Lookup Help

    Yes - that seems to work perfectly.
    Hope you were away and enjoyed yourself. Sometimes, conferences can be a real bore

+ 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