+ Reply to Thread
Results 1 to 3 of 3

If/OR formula, criteria met on Sheet A, show data from Sheet B onto Sheet A

  1. #1
    Registered User
    Join Date
    05-07-2020
    Location
    USA
    MS-Off Ver
    Microsoft Office 2016
    Posts
    1

    If/OR formula, criteria met on Sheet A, show data from Sheet B onto Sheet A

    Sheet A:

    A B C D
    Hitter vs Pitcher Pitcher Throws Hitter Average vs Hand
    Barry Bonds Randy Johnson Left Handed ????????


    Sheet B:

    A B C
    Hitter Average vs Left Handed Average vs Right Handed
    Barry Bonds .310 .365


    I am trying to create a formula to display: Sheet A the Hitters Average vs Hand in Column D based on Column C. The data in Column D in Sheet A will either be Column B or C from Sheet B.

    So I have been trying to use an IF/OR formula but it is not displaying the data correctly. I am trying to have a more compact "Master" Sheet that only displays the relevant information for that particular day. Today Barry Bonds is against Randy Johnson (Left Handed). I only need to see Barry Bonds average vs Left Handed Pitchers. Tomorrow if Barry Bonds plays against a Right Handed Pitcher, I only need to see his average against Right Handed Pitchers.

    Currently my formula:

    =IF(C2="Left Handed",(INDEX('Sheet B'!B:B,MATCH(A2,'Sheet B'!A:A),OR(IF(C2="Right Handed",(INDEX('Sheet B'!C:C,MATCH(A2,'Sheet B'!A:A))))))))

    If C2 is Left Handed, Match the Hitter Name from Sheet A Column A with the Hitter Name on Sheet B Column A, display Column B from Sheet B

    OR

    If C2 is Right Handed, Match the Hitter Name from Sheet A Column A with the Hitter Name on Sheet B Column A, display Column C from Sheet B

  2. #2
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: If/OR formula, criteria met on Sheet A, show data from Sheet B onto Sheet A

    Hi,

    If you are willing to change the titles in sheet2 to "Left Handed" and "Right handed" and omit the "Average vs"
    then you can do a double match like that:

    =INDEX(Sheet2!$B$2:$C$2,MATCH(Sheet1!A$2,Sheet2!$A$2:$A$70), MATCH(Sheet1!C$2,Sheet2!$B$1:$C$1,0))
    (yellow tables in the attachment)

    If you want to leave the titles as is, then use this formula:

    =IF(Sheet1!C7="Left Handed",INDEX(Sheet2!A6:C6, MATCH(Sheet1!A7,Sheet2!A6:A10,0),2),IF(Sheet1!C7="Right Handed",INDEX(Sheet2!A6:C6, MATCH(Sheet1!A7,Sheet2!A6:A10,0),3)))
    (green tables in the attachment).
    Attached Files Attached Files

  3. #3
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: If/OR formula, criteria met on Sheet A, show data from Sheet B onto Sheet A

    Looking at your formula again, you should just lose the "OR" :

    =IF(C2="Left Handed",(INDEX('Sheet B'!B:B,MATCH(A2,'Sheet B'!A:A),IF(C2="Right Handed",(INDEX('Sheet B'!C:C,MATCH(A2,'Sheet B'!A:A)))))))
    Last edited by Limor_OP; 05-07-2020 at 08:05 PM.

+ 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. Select a Sheet in Combobox. Show that's Sheet Data in Listbox.
    By svgopalareddy in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-03-2018, 09:53 AM
  2. Replies: 8
    Last Post: 05-08-2016, 12:48 AM
  3. Replies: 2
    Last Post: 01-23-2016, 01:16 PM
  4. Replies: 6
    Last Post: 04-22-2014, 11:32 AM
  5. [SOLVED] show a list of names on from sheet 1 in sheet 2 when marked active in sheet 1...???
    By stolen_83 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-11-2013, 04:57 PM
  6. [SOLVED] Copy and paste data from sheet 2 to sheet 1 based on specific criteria on sheet 1
    By VBADUD in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-05-2012, 04:18 AM
  7. Replies: 3
    Last Post: 05-17-2012, 08:53 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