+ Reply to Thread
Results 1 to 6 of 6

if and statements

  1. #1
    Registered User
    Join Date
    12-12-2008
    Location
    Tahoe
    Posts
    21

    Unhappy if and statements

    Hello:

    I need help with a formula. I believe the formula I should be using is a combination if / and. Here's what I'm trying to do:

    I'm trying to find 'x' in one spreadsheet in a specific column in another spreadsheet -- at the same time 'y' in the first spreadsheet also has to match another specific column in the second spreadsheet --- if so, then I would like it to return a specific text from the second spreadsheet.

    For example:

    FIRST SPREADSHEET
    A B
    1 BobSmith 123456
    2 JillJones 789012
    3 JonRhodes 345678

    SECOND SPREADSHEET
    A B C
    1 BobSmith 123456 07/29/71
    2 JillJones 789012 03/23/62
    3 JonRhodes 345678 02/17/61

    I'm thinking the formula should be:

    =IF(AND(A1=SECOND SPREADSHEET A:A,B1=SECOND SPREADSHEET B:B),C,0)

    Any thoughts???

  2. #2
    Forum Contributor mewingkitty's Avatar
    Join Date
    09-29-2008
    Location
    Fort McMurray, Alberta, Canada
    MS-Off Ver
    Excel 2003
    Posts
    949

    From...?

    C from which spreadsheet?

  3. #3
    Registered User
    Join Date
    12-12-2008
    Location
    Tahoe
    Posts
    21
    From Second Spreadsheet.

  4. #4
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    if and statements

    A bit vague...but...maybe this?

    With
    On Sheet2, cells A1:C3
    Please Login or Register  to view this content.

    and...
    On Sheet1, cells A1:B3

    Please Login or Register  to view this content.

    Then, this formula, on Sheet1 returns the appropriate date from Sheet2
    Please Login or Register  to view this content.

    Copy that formula down through C3.

    Does that help?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  5. #5
    Forum Contributor mewingkitty's Avatar
    Join Date
    09-29-2008
    Location
    Fort McMurray, Alberta, Canada
    MS-Off Ver
    Excel 2003
    Posts
    949

    This's how I'd do it

    Explanation in attachment.
    There's many ways to go about this.
    Let us know if any of ours work!

    mew!
    Attached Files Attached Files
    Last edited by mewingkitty; 12-12-2008 at 05:43 PM.

  6. #6
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Possible alternative

    If the Col_B values happen to be Unique Identifiers (like Employee IDs),
    then a formula like this is more appropriate:
    On Sheet1

    Please Login or Register  to view this content.
    Oh...and Col_C needs to be formatted as a date.

    Does that help?

+ 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