# Inconsistent formula

#### Preacherman771

##### New Member
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

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.

#### Fluff

##### MrExcel MVP, Moderator
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"))``

#### steve the fish

##### Well-known Member
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")))

#### Preacherman771

##### New Member
I made your suggested change and worked perfectly. Thank you so much.

#### Fluff

##### MrExcel MVP, Moderator
Glad we could help & thanks for the feedback.

Replies
5
Views
458
Replies
2
Views
357
Replies
0
Views
37
Replies
2
Views
63
Replies
0
Views
86

1,181,607
Messages
5,930,881
Members
436,764
Latest member

### 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.

### Which adblocker are you using?

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

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