Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pro Football formula automation
I posted a similar question on another board, haven't had luck yet.
Will try to explain it better here. In column B, I have opponents for teams in column A. I have empty cells between each team in column A also. Ex: A2:A17 is Arizona, B2:B17 is San Fransisco, Seattle, Baltimore, etc. (Opponents of Arizona) Then I skip 2 lines and list Atlanta in A20:A37 and list their opponents in B20:B37, and I do this for all 32 teams. The last entry ends on row 638. I have Named Ranges for each team, but the names differ from the team names. Arizona's Named Range is "Ari_Avg", Atlanta's is "Atl_Avg", San Fransisco's is SF_Avg etc. What I need to do (in VBA I suppose), is write a formula in column G that looks in column B, and if B2 text is San Fransisco, then write the formula "=AVERAGE(SF_Avg)" I have searched Help and Newsgroups for an answer, and have tried different methods, but can't get my code to work. I tried using 32 if's (one for each team) but keep getting errors, like If without block If. Would it be easier to name my Named Ranges to equal the text in B2:B638, then use Offset, like another guy tried to help me with? Shoot, I couldn't even make that work. I think I need something like: If c.Value(B2:B638) = San Fransisco Then (G2:G638).Formula = "AVERAGE(SF_Avg)" Hope someone can help. Thanks. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Formula for evaluating predictions - Fantasy Football League | Excel Discussion (Misc queries) | |||
Formula for Football (Soccer) Prediction League | Excel Discussion (Misc queries) | |||
Supressing the ctrl-c and other keys during word automation in automation | Excel Programming | |||
Fantasy Football Datbase or Formula | Excel Discussion (Misc queries) | |||
Football Predictions Spreadsheet formula problem | Excel Programming |