Formula Help

dylancock

New Member
Joined
May 26, 2022
Messages
6
Office Version
  1. 365
Platform
  1. MacOS
Hey guys,
I just need another formula. I'll do my best to explain using the attached image. I want the J column named "Result" on the first table to be linked to the U column named "Result" on the second table. I want to create the value for the J column using the second table's U column. I also want this to coincide the Reference columns "C" on the first table, and "N" on the second table. I'll use the example using the Reference 1. I want the value on the first tables Result column to be made up of the results on the second tables result columns. So reference 1 on the first table would be linked to the three reference 1s on the second table. If the result on the three second table results read "win, win, win", the result on the first table would be win. If the result on the three second table results read win win loss, the result on the first table would be loss. If any of the bets read loss, meaning if two of them did, or all three did, I want the first table to be loss. However, if any of the three results on the second table read void, the first table should say void, no matter if the others are win or loss. This is the best explanation I can give, so if I need to clarify anything, let me know!

dodgy book.xlsx
ABCDEFGHIJKLMNOPQRSTU
1
2DateGameReferenceVariablesChanceConfidenceConfidence Chance AdvantageNumber ValueResultProfit/LossOverallReferencePlayerOutcomeChanceConfidenceConfidence Odds AdvantageResult
327-May133.250.41652.400960435.36%#N/A#N/A1Variable 1To succeed 1.190.851.18win
42330.33.3333333-10.00%#N/A#N/A1Variable 2To succeed 1.990.71.43win
53330.3432.91545192.90%#N/A#N/A1Variable 3To succeed 1.350.71.43loss
641411300.00%#N/A#N/A2Variable 4To succeed 2.70.42.50win
70#DIV/0!#DIV/0!#N/A#N/A2Variable 5To succeed 1.250.751.33win
80#DIV/0!#DIV/0!#N/A#N/A3Variable 6To succeed 1.540.71.43win
90#DIV/0!#DIV/0!#N/A#N/A3Variable 7To succeed 1.610.71.43void
100#DIV/0!#DIV/0!#N/A#N/A3Variable 8To succeed 1.230.71.43loss
110#DIV/0!#DIV/0!#N/A#N/A#DIV/0!
120#DIV/0!#DIV/0!#N/A#N/A#DIV/0!
130#DIV/0!#DIV/0!#N/A#N/A#DIV/0!
Sheet1
Cell Formulas
RangeFormula
F3:F13F3=PRODUCT(IF(Table2[Reference]=[@Reference],Table2[Confidence],1))
G3:G13G3=1/([@Confidence])
H3:H13H3=([@Chance]-[@[Confidence Chance]])/[@[Confidence Chance]]
K3:K13K3=IFS(J3="win",[@[Number Value]]*[@Chance]-[@[Number Value]],[@Result]="loss",0-[@[Number Value]],[@Result]="void","0")
L3:L13L3=SUM($K$3:K3)
S3:S13S3=1/[@Confidence]
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
try in J3:
Code:
=IF(COUNTIF($N$3:$N$13,C3)=0,"",IF(COUNTIFS($N$3:$N$13,C3,$U$3:$U$13,"void"),"void",IF(COUNTIFS($N$3:$N$13,C3,$U$3:$U$13,"loss"),"loss","win")))
 
Upvote 0
Thanks mate, is there a way to just make the $N$3:$N$13 bit the whole column?
 
Upvote 0
Rather than using the entire column, you can use the table reference like
Excel Formula:
=IF(COUNTIF(Table2[Reference],[@Reference])=0,"",IF(COUNTIFS(Table2[Reference],[@Reference],Table2[Result],"void"),"void",IF(COUNTIFS(Table2[Reference],[@Reference],Table2[Result],"loss"),"loss","win")))
 
Upvote 0
Solution
You could also make use of the LET function & some names.

Excel Formula:
=LET(ref,Table2[Reference],res,Table2[Result],IF(COUNTIF(ref,[@Reference]),IF(COUNTIFS(ref,[@Reference],res,"void"),"void",IF(COUNTIFS(ref,[@Reference],res,"loss"),"loss","win")),""))
 
Upvote 0
Rather than using the entire column, you can use the table reference like
Excel Formula:
=IF(COUNTIF(Table2[Reference],[@Reference])=0,"",IF(COUNTIFS(Table2[Reference],[@Reference],Table2[Result],"void"),"void",IF(COUNTIFS(Table2[Reference],[@Reference],Table2[Result],"loss"),"loss","win")))
says there is a problem with the formula and I'm too silly to figure it out :(
 
Upvote 0
As I understand the problem, @Fluff's formula worked for me. My formula in column J below and Fluff's in column K

dylancock.xlsm
CJKNOUV
1
2ReferenceResultResult2Reference AdvantageResult
31lossloss1win
42winwin1win
53voidvoid1loss
64  2win
7  2win
8  3win
9  3void
10  3loss
11  
12  
13  
Sheet1
Cell Formulas
RangeFormula
J3:J13J3=LET(ref,Table2[Reference],res,Table2[Result],IF(COUNTIF(ref,[@Reference]),IF(COUNTIFS(ref,[@Reference],res,"void"),"void",IF(COUNTIFS(ref,[@Reference],res,"loss"),"loss","win")),""))
K3:K13K3=IF(COUNTIF(Table2[Reference],[@Reference])=0,"",IF(COUNTIFS(Table2[Reference],[@Reference],Table2[Result],"void"),"void",IF(COUNTIFS(Table2[Reference],[@Reference],Table2[Result],"loss"),"loss","win")))
 
Upvote 0
It was my mistake, I renamed the table so it didn't work :ROFLMAO: thank you guys for all your help!
 
Upvote 0
You're welcome. Glad we could help. Thanks for the follow-up.
 
Upvote 0

Forum statistics

Threads
1,223,243
Messages
6,170,971
Members
452,371
Latest member
Frana

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top