Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Formula Help required

I am trying to complete a task in excel without the use of macros if
possible.

I have a table of football results like this

Week Home Team Away Team Home Score Away Score Predicted Home
Pred. Away

3 Patriots Dolphins ? ?
2 Patriots Jets 22 10
2 Chargers Bills 31 23
2 Colts Falcons 10 12
1 Bills Patriots 12 14

What I need to do is add the last 4 scores of a team, divide by 4 and
have this display as the predicted score for that team on the row for
the upcoming week.

I am not sure how I can get excel to find the last 4 scores of a team
regardless of whether they played at home or away.

Any help would be much appreciated. Thanks

  #2   Report Post  
Posted to microsoft.public.excel.misc
DB DB is offline
external usenet poster
 
Posts: 45
Default Formula Help required

cant help you at all mate.....sorry...

looks to me like you are trying to beat the bookies,lol

Good Luck

DB :)




wrote in message
ups.com...
I am trying to complete a task in excel without the use of macros if
possible.

I have a table of football results like this

Week Home Team Away Team Home Score Away Score Predicted Home
Pred. Away

3 Patriots Dolphins ? ?
2 Patriots Jets 22 10
2 Chargers Bills 31 23
2 Colts Falcons 10 12
1 Bills Patriots 12 14

What I need to do is add the last 4 scores of a team, divide by 4 and
have this display as the predicted score for that team on the row for
the upcoming week.

I am not sure how I can get excel to find the last 4 scores of a team
regardless of whether they played at home or away.

Any help would be much appreciated. Thanks



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 695
Default Formula Help required

Tryed with a formula - no luck :-) so maby a function


Function Predicted(myRange As Range, Team)

Dim t(30), col(30), score(30)
Application.Volatile

For Each c In myRange
If c = Team Then
t(nbr) = Cells(c.Row, 1)
col(nbr) = c.Column
score(nbr) = c.Offset(0, 2)
nbr = nbr + 1
End If
Next

For n = 0 To UBound(t)
For i = n + 1 To UBound(t)
If t(i) t(n) Then
x = t(n): t(n) = t(i): t(i) = x
x = col(n): col(n) = col(i): col(i) = x
x = score(n): score(n) = score(i): score(i) = x
End If
Next
Next

Predicted = score(0) + score(1) + score(2) + score(3) / 4

End Function

-----------------------------------------
in ur sheet input this fx.:
=Predicted(B3:C100,"Patriots")
-----------------------------------------



" skrev:

I am trying to complete a task in excel without the use of macros if
possible.

I have a table of football results like this

Week Home Team Away Team Home Score Away Score Predicted Home
Pred. Away

3 Patriots Dolphins ? ?
2 Patriots Jets 22 10
2 Chargers Bills 31 23
2 Colts Falcons 10 12
1 Bills Patriots 12 14

What I need to do is add the last 4 scores of a team, divide by 4 and
have this display as the predicted score for that team on the row for
the upcoming week.

I am not sure how I can get excel to find the last 4 scores of a team
regardless of whether they played at home or away.

Any help would be much appreciated. Thanks


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
FORMULA REQUIRED shaji Excel Discussion (Misc queries) 2 September 12th 06 04:05 PM
Help required for formula recklaw Excel Discussion (Misc queries) 2 March 15th 06 11:11 AM
Formula help required!!! CADmanJP Excel Worksheet Functions 2 March 10th 06 03:45 AM
Formula Required Funkyfido Excel Worksheet Functions 2 January 25th 06 10:30 AM
A Formula required - please! Anthony Excel Discussion (Misc queries) 2 July 21st 05 10:11 AM


All times are GMT +1. The time now is 01:23 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"