+ Reply to Thread
Results 1 to 11 of 11

If Different Cells Match Then Add Value

Hybrid View

  1. #1
    Registered User
    Join Date
    09-16-2012
    Location
    Sydney
    MS-Off Ver
    Office 2003
    Posts
    47

    If Different Cells Match Then Add Value

    Hi, I've got a spreadsheet where people select the colour they think is going to win. The 'Outcome' sheet goes the outcome of the challenges and which colour won which challenge. The 'Board' sheet shows how many points someone is on. The 'Event' sheet show which colours the players selected.

    So in challenge A, C, D, James chose the correct colour. I'm trying to add two points to James' points tally for each win. So essentially James should now have six points as he won three times. I'm just unsure of the formula to use to calculate the total points for each user.

    You may notice the challenges in the 'Event' sheet are spaced apart because there is other data which goes in between and I also need this to work in Excel 2010. Please see attached. Any help would be great. Thanks.
    Attached Files Attached Files

  2. #2
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Microsoft® Excel® for Microsoft 365 MSO (Version 2503 Build 16.0.18604.20000) 64-bit
    Posts
    3,992

    Re: If Different Cells Match Then Add Value

    Hi,

    Use this formula in Event sheet's L3=IFERROR(IF(INDEX(Outcome!$B$5:$B$9,MATCH(Event!C1,Outcome!$A$5:$A$9,0))=C3,2,0)+IF(INDEX(Outcome!$B$5:$B$9,MATCH(Event!E1,Outcome!$A$5:$A$9,0))=E3,2,0)+IF(INDEX(Outcome!$B$5:$B$9,MATCH(Event!G1,Outcome!$A$5:$A$9,0))=G3,2,0)+IF(INDEX(Outcome!$B$5:$B$9,MATCH(Event!I1,Outcome!$A$5:$A$9,0))=I3,2,0)+IF(INDEX(Outcome!$B$5:$B$9,MATCH(Event!K1,Outcome!$A$5:$A$9,0))=K3,2,0),"")

    in Event sheet L3
    Formula: copy to clipboard
    =IFERROR(IF(INDEX(Outcome!$B$5:$B$9,MATCH(Event!C1,Outcome!$A$5:$A$9,0))=C3,2,0)+IF(INDEX(Outcome!$B$5:$B$9,MATCH(Event!E1,Outcome!$A$5:$A$9,0))=E3,2,0)+IF(INDEX(Outcome!$B$5:$B$9,MATCH(Event!G1,Outcome!$A$5:$A$9,0))=G3,2,0)+IF(INDEX(Outcome!$B$5:$B$9,MATCH(Event!I1,Outcome!$A$5:$A$9,0))=I3,2,0)+IF(INDEX(Outcome!$B$5:$B$9,MATCH(Event!K1,Outcome!$A$5:$A$9,0))=K3,2,0),"")


    Bord sheet C5=VLOOKUP($B5,Event!$B:$L,MATCH(Board!$C$3,Event!$B$1:$L$1,0),FALSE)

    Formula: copy to clipboard
    =VLOOKUP($B5,Event!$B:$L,MATCH(Board!$C$3,Event!$B$1:$L$1,0),FALSE)


    you can also invisible the whole column L (event sheet) just enter "." in A1 cell
    Attached Files Attached Files
    Last edited by shukla.ankur281190; 09-09-2015 at 07:06 AM.
    If I helped, Don't forget to add reputation (click on the little star ★ at bottom of this post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)

  3. #3
    Registered User
    Join Date
    09-16-2012
    Location
    Sydney
    MS-Off Ver
    Office 2003
    Posts
    47

    Re: If Different Cells Match Then Add Value

    Hi Shukla, Thanks for your response. However, I could not get this to work. Please note, I'm using Excel 2003 from home though so I don't know if you need 2010. The computer at work has 2010.

    I've attached the file again to show you what I tried to do. Is there a formula which works for both versions? Thanks for your help again.
    Attached Files Attached Files
    Last edited by jaclrsen; 09-09-2015 at 07:10 AM.

  4. #4
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Microsoft® Excel® for Microsoft 365 MSO (Version 2503 Build 16.0.18604.20000) 64-bit
    Posts
    3,992

    Re: If Different Cells Match Then Add Value

    Copy of Sample5.xlsHey i am sorry i was attached the wrong 1.

    Please find attached revised one.
    Last edited by shukla.ankur281190; 09-09-2015 at 07:23 AM.

  5. #5
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Microsoft® Excel® for Microsoft 365 MSO (Version 2503 Build 16.0.18604.20000) 64-bit
    Posts
    3,992

    Re: If Different Cells Match Then Add Value

    You just need to remove Ifferror formula. use below one.
    Formula: copy to clipboard
    =IF(INDEX(Outcome!$B$5:$B$9,MATCH(Event!C1,Outcome!$A$5:$A$9,0))=C3,2,0)+IF(INDEX(Outcome!$B$5:$B$9,MATCH(Event!E1,Outcome!$A$5:$A$9,0))=E3,2,0)+IF(INDEX(Outcome!$B$5:$B$9,MATCH(Event!G1,Outcome!$A$5:$A$9,0))=G3,2,0)+IF(INDEX(Outcome!$B$5:$B$9,MATCH(Event!I1,Outcome!$A$5:$A$9,0))=I3,2,0)+IF(INDEX(Outcome!$B$5:$B$9,MATCH(Event!K1,Outcome!$A$5:$A$9,0))=K3,2,0)


    or you can use below one

    Formula: copy to clipboard
    =IF(ISNA(IF(INDEX(Outcome!$B$5:$B$9,MATCH(Event!C1,Outcome!$A$5:$A$9,0))=C3,2,0)+IF(INDEX(Outcome!$B$5:$B$9,MATCH(Event!E1,Outcome!$A$5:$A$9,0))=E3,2,0)+IF(INDEX(Outcome!$B$5:$B$9,MATCH(Event!G1,Outcome!$A$5:$A$9,0))=G3,2,0)+IF(INDEX(Outcome!$B$5:$B$9,MATCH(Event!I1,Outcome!$A$5:$A$9,0))=I3,2,0)+IF(INDEX(Outcome!$B$5:$B$9,MATCH(Event!K1,Outcome!$A$5:$A$9,0))=K3,2,0)),"",IF(INDEX(Outcome!$B$5:$B$9,MATCH(Event!C1,Outcome!$A$5:$A$9,0))=C3,2,0)+IF(INDEX(Outcome!$B$5:$B$9,MATCH(Event!E1,Outcome!$A$5:$A$9,0))=E3,2,0)+IF(INDEX(Outcome!$B$5:$B$9,MATCH(Event!G1,Outcome!$A$5:$A$9,0))=G3,2,0)+IF(INDEX(Outcome!$B$5:$B$9,MATCH(Event!I1,Outcome!$A$5:$A$9,0))=I3,2,0)+IF(INDEX(Outcome!$B$5:$B$9,MATCH(Event!K1,Outcome!$A$5:$A$9,0))=K3,2,0))
    Last edited by shukla.ankur281190; 09-09-2015 at 07:20 AM.

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,768

    Re: If Different Cells Match Then Add Value

    Try

    C5....

    =VLOOKUP($B5,Event!$B3:$L10,11,FALSE)

    And in L3 enter formula with Ctrl+Shift+Enter

    Note that PURPLE in OUTCOME had an extra blank so you would not get a match.

    You should now get a result of 6.

  7. #7
    Registered User
    Join Date
    09-16-2012
    Location
    Sydney
    MS-Off Ver
    Office 2003
    Posts
    47

    Re: If Different Cells Match Then Add Value

    Hi Shukla and John, Using both of your formulas worked very well and did exactly what I needed. Thank you so much. Just a question for both of you. Shukla, how did you make the 'L' Column invisible when putting in the '.'. I couldn't replicate this.

    John, in the VLOOKUP formula, what does the '11' refer to? I'm thinking that B3:L10 is the range.

    Thank you the both of you. Your help is really appreciated.

  8. #8
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Microsoft® Excel® for Microsoft 365 MSO (Version 2503 Build 16.0.18604.20000) 64-bit
    Posts
    3,992

    Re: If Different Cells Match Then Add Value

    I have used conditional formatting for making L column invisible dear

    Second Questing which is asking you to Mr. John => We need to tell Vlookup which column you need to show as result that is why Mr. John did 11 column reference. I did instead of 11 to Match function.

  9. #9
    Registered User
    Join Date
    09-16-2012
    Location
    Sydney
    MS-Off Ver
    Office 2003
    Posts
    47

    Re: If Different Cells Match Then Add Value

    Hi Shukla, It makes sense now. Thank you so much for that explanation and for all of your help. I'm grateful for John's help too. Thanks.

  10. #10
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Microsoft® Excel® for Microsoft 365 MSO (Version 2503 Build 16.0.18604.20000) 64-bit
    Posts
    3,992

    Re: If Different Cells Match Then Add Value

    We glad to help you. Please mark it as solved and if you liked it make click on star for reputation.
    Last edited by shukla.ankur281190; 09-09-2015 at 08:46 AM.

  11. #11
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,768

    Re: If Different Cells Match Then Add Value

    Glad to have helped. If you are OK with the results, can you mark the thread as SOLVED ("Thread Tools" on first posting).

    Thank you.

+ 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. [SOLVED] Find partial match between two columns and highlight cells that match
    By TomToms in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 07-18-2019, 01:07 PM
  2. Validating 2 cells goes wrong, finds first match instead of exact match.
    By EricNL in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-10-2015, 08:38 AM
  3. [SOLVED] Match one cell with another, if match found copy adjacent cells
    By Xiophoid in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-07-2013, 05:50 AM
  4. Search a worbook, match cells, input stuff into first workbook if they match.
    By EvilErniesSK in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-07-2012, 11:49 AM
  5. Replies: 14
    Last Post: 12-07-2010, 10:13 PM
  6. [SOLVED] Excel: match two cells in one sheet to two cells in another and return a third cells value
    By Dave Breitenbach in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-06-2005, 04:05 AM
  7. Replies: 0
    Last Post: 09-06-2005, 02:05 AM

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