+ Reply to Thread
Results 1 to 5 of 5

If this number=number AND this date=this date, then display value in this 3rd column

Hybrid View

  1. #1
    Registered User
    Join Date
    07-05-2013
    Location
    North Carolina
    MS-Off Ver
    Excel 2010
    Posts
    9

    Question If this number=number AND this date=this date, then display value in this 3rd column

    I am trying to create a function that pulls data from another sheet that allows me to match two location #'s and 2 dates within a range, then display the value in the 3rd column.

    Here is an example of what I mean: =If(Sheet1!A2=Sheet2!A2:A7) AND If(Sheet1!B2=Sheet2!B2:B7) THEN display value on Sheet 2 column C. Is there a function for this? Thanks for your help!

    Sheet 1:
    A B
    1 Location# Date
    2 123 7/1/2013
    3 456 7/1/2013
    4 789 7/1/2013
    5 123 6/28/2013
    6 456 6/28/2013
    7 789 6/28/2013



    Sheet 2:
    A B C
    1 Location# Date Employees
    2 123 7/1/2013 10
    3 456 7/1/2013 15
    4 789 7/1/2013 20
    5 123 6/28/2013 4
    6 456 6/28/2013 9
    7 789 6/28/2013 14

  2. #2
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: If this number=number AND this date=this date, then display value in this 3rd column

    crachelle04,

    Welcome to the forum!
    Using your example, on Sheet1 cell C2 and copied down:
    =IFERROR(INDEX(Sheet2!$C$2:$C$7,MATCH(A2&B2,INDEX(Sheet2!$A$2:$A$7&Sheet2!$B$2:$B$7,),0)),"")
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Registered User
    Join Date
    07-05-2013
    Location
    North Carolina
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: If this number=number AND this date=this date, then display value in this 3rd column

    Thank you so much for your help! This worked perfectly!

  4. #4
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: If this number=number AND this date=this date, then display value in this 3rd column

    You're very welcome

    If that takes care of your need, please mark this thread as solved.
    How to mark a thread Solved
    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word "Title" you will see a dropdown with the words "No prefix"
    Change to "Solved"
    Click Save

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: If this number=number AND this date=this date, then display value in this 3rd column

    Here's another possibility...

    If the combination of location plus date is unique...

    Enter this formula in Sheet1 cell C2 and copy down as needed:

    =SUMIFS(Sheet2!C$2:C$7,Sheet2!A$2:A$7,A2,Sheet2!B$2:B$7,B2)
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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