+ Reply to Thread
Results 1 to 6 of 6

Football (Soccer!) points scoring

  1. #1
    Registered User
    Join Date
    08-20-2013
    Location
    Nottingham, England
    MS-Off Ver
    Excel 2013
    Posts
    41

    Football (Soccer!) points scoring

    Hi,

    I have 2 cells, both of which contain 3 characters. These can be W, D, L or -. I want to count how many "real" characters there are (W, D or L) as GAMES. A maximum points score will be GAMES * 3 (MAXSCORE). Where W = 3, D = 1 and L = 0 I need a total across the 2 cells (TOTAL). Finally TOTAL / MAXSCORE will give me a value. How can I get this into a formula?

    Many thanx

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Football (Soccer!) points scoring

    Are the cells adjacent? If so then use this for a horizontal range like A2:B2 [edited]

    =IFERROR(SUMPRODUCT((LEN(A2:B2)-LEN(SUBSTITUTE(A2:B2,{"W";"D"},"")))*{3;1})/SUMPRODUCT(LEN(SUBSTITUTE(A2:B2,"-","")))/3,0)
    Last edited by daddylonglegs; 08-20-2013 at 06:13 AM.
    Audere est facere

  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Football (Soccer!) points scoring

    ....or this method is shorter and will allow you to use any two cells (adjacent or not) but requires "array entry"

    =IFERROR(AVERAGE(IF(MID(A2&B2,{1,2,3,4,5,6},1)={"W";"D";"L"},{3;1;0}/3)),0)

    confirmed with CTRL+SHIFT+ENTER

  4. #4
    Registered User
    Join Date
    08-20-2013
    Location
    Nottingham, England
    MS-Off Ver
    Excel 2013
    Posts
    41

    Re: Football (Soccer!) points scoring

    ok, I like the second method. I have a further small complication. I actually have 3 cells with data (Home Form, Away Form & Head 2 Head). For the Home score I use Home Form & Head 2 Head, for the Away score I use Away Form & Head 2 Head. The problem is the Head 2 Head data is based on the Home team (ie W = win for home team). Therefore I need the W and L to be switched for the Away calculation.

    Thanks again.

  5. #5
    Registered User
    Join Date
    08-20-2013
    Location
    Nottingham, England
    MS-Off Ver
    Excel 2013
    Posts
    41

    Re: Football (Soccer!) points scoring

    So I used the SUBSTITUTE command to change the W to L in a hidden column and it all now works as expected.

    Not elegant, I know, but it does the job.

    Many thanks again.

  6. #6
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Football (Soccer!) points scoring

    To switch the points you can just adjust the {3;1;0} part which are the points assigned respectively to {"W";"D";"L"} so you can make that {0;1;3} for the away calculation, i.e.

    =IFERROR(AVERAGE(IF(MID(A2&B2,{1,2,3,4,5,6},1)={"W";"D";"L"},{0;1;3}/3)),0)

+ 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. Processing football(soccer) results
    By teacherphil in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 02-11-2013, 10:02 AM
  2. New Football (Soccer) Season
    By Domski in forum The Water Cooler
    Replies: 25
    Last Post: 07-26-2011, 11:17 AM
  3. Sorting a football/soccer league table
    By daveycmc in forum Excel General
    Replies: 13
    Last Post: 06-20-2010, 09:02 AM
  4. Football (soccer) predictions formula
    By genius7082 in forum Excel General
    Replies: 4
    Last Post: 08-12-2008, 10:05 PM
  5. Soccer league scoring // Excel right option?
    By bulldogric in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-01-2008, 06:00 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