Inconsistent formula

Preacherman771

New Member
Joined
Jun 15, 2021
Messages
46
Office Version
  1. 365
Platform
  1. Windows
I list football scores down various cells in various columns. Below each cell with a score, I am wishing to determine whether the left number of the score is greater than, less than or equal to the right score. When I use the exact same formula, I do not receive the correct value consistently. Would appreciate any help in determining the reason(s) for the inconsistency.

NFL 2021-2022 Standings (Template).xlsx
GH
19038-327-3
191WL
1920.500
19347-4238-6
194WL
1950.500
196  
197  
198 
19933-16 
200W 
2011.000
20224-10 
203W 
2041.000
205 40-14
206 W
2071.000
208 20-34
209 L
2100.000
Calc_Results
Cell Formulas
RangeFormula
G190,G193,G196,G199,G202,G205,G208G190=IF(IFERROR(INDEX(Tab_Schedule[ScoreA],MATCH(1,(G$182=Tab_Schedule[Away])*($C190=Tab_Schedule[HOME]),0)),"")="","",INDEX(Tab_Schedule[ScoreA],MATCH(1,(G$182=Tab_Schedule[Away])*($C190=Tab_Schedule[HOME]),0))&"-"&INDEX(Tab_Schedule[ScoreH],MATCH(1,(G$182=Tab_Schedule[Away])*($C190=Tab_Schedule[HOME]),0)))
H190,H193,H196,H199,H202,H205,H208H190=IF(IFERROR(INDEX(Tab_Schedule[ScoreH],MATCH(1,(G$182=Tab_Schedule[HOME])*($C190=Tab_Schedule[Away]),0)),"")="","",INDEX(Tab_Schedule[ScoreH],MATCH(1,(G$182=Tab_Schedule[HOME])*($C190=Tab_Schedule[Away]),0))&"-"&INDEX(Tab_Schedule[ScoreA],MATCH(1,(G$182=Tab_Schedule[HOME])*($C190=Tab_Schedule[Away]),0)))
G191:H191,G194:H194,G197:H197,G200:H200,G203:H203,G206:H206,G209:H209G191=IF(G190="","",IF(LEFT(G190,FIND("-",G190)-1)>RIGHT(G190,LEN(G190)-FIND("-",G190)),"W",IF(LEFT(G190,FIND("-",G190)-1)<RIGHT(G190,LEN(G190)-FIND("-",G190)),"L","T")))
G192,G195,G198,G201,G204,G207,G210G192=IF(AND(G191="",H191=""),"",IF(AND(G191="-------",H191="-------"),"-------",SUM(((0.5*COUNTIF(G191:H191,"T"))+COUNTIF(G191:H191,"W"))/SUM(COUNTIF(G191:H191,"W")+COUNTIF(G191:H191,"L")+COUNTIF(G191:H191,"T")))))
Press CTRL+SHIFT+ENTER to enter array formulas.
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
You are comparing text values & not numbers which is causing the problem. Try
Excel Formula:
=IF(G190="","",CHOOSE(SIGN(LEFT(G190,FIND("-",G190)-1)-RIGHT(G190,LEN(G190)-FIND("-",G190)))+2,"L","T","W"))
 
Upvote 0
You are comparing textual numbers rather than comparing real numbers. For that reason 37-4, for example, will produce L becaue 3 is less than 4. Add zero to each left/ right formula. It will then coerce those textual numbers into real numbers before the comparison. Presuming your formulas are otherwise correct:

=IF(G190="","",IF(0+LEFT(G190,FIND("-",G190)-1)>0+RIGHT(G190,LEN(G190)-FIND("-",G190)),"W",IF(0+LEFT(G190,FIND("-",G190)-1)<0+RIGHT(G190,LEN(G190)-FIND("-",G190)),"L","T")))
 
Upvote 0
Solution
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,213,551
Messages
6,114,273
Members
448,559
Latest member
MrPJ_Harper

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