MACRO PROBLEM

POLCAT119

New Member
Joined
Jul 26, 2007
Messages
1
I'm new to the MACRO and new a little help with a problem I'm having.
I have two wokbooks one called CFLDATABASE where have a list of all CFL game scores since 2000; my second workbook is called CFLSC where I copaer the ast scores to predict the outcome of current games. I need te MACR to go down COL"A" in the CFLC workbook seect the firts team and then go to the CFLDATABASE WORKBOOK AND
1. Filter for the selected team
2. Filterfor the opp
3. Past only the last three game results
4. Copy the date back to a specfic area of the CFLSC workbook.
Then go to he next team unntil the wees scheduled gamesis complete.
This is the code I hace so Far:
Sub CFL()
'
' CFL Macro
' CFL Macro recorded 7/23/2007 by Wade Dues
'ChDir "I:\"
Workbooks.Open Filename:="I:\CFL DATABASE.xls"
ActiveWindow.WindowState = xlNormal
Workbooks.Open Filename:="I:\CFLSC.xls"
Selection.AutoFilter Field:=2, Criteria1:="Blanks"
Sheets("SCHEDULE").Select
Selection.AutoFilter Field:=2, Criteria1:="5"
Selection.AutoFilter Field:=4, Criteria1:="Montreal"
Range("D2").Select
Selection.Copy


End Sub

I have attached a sample of both work sheets...thanks in advance


In the example: I would need to go tothe databaseane lookup EDM in the database and filte ofr the OPPONENT BC ; select the last tree rows ony and retrn the value to the CFLSC workshhet. Then move don 3 rowsto the next team a repeat the process until the weeks game schedule s complete...HELP!

CFLDATABASE
YR WK L TEAM OPP 1Q 2Q
2007 WK1 A BC Toronto 7 3
2007 WK1 H Toronto BC 0 15
2007 WK1 A Winnipeg Edmonton 7 14
2007 WK1 H Edmonton Winnipeg 15 7
2007 WK1 A Saskatchewan Montreal 0 6
2007 WK1 H Montreal Saskatchewan 2 0
2007 WK1 A Hamilton Calgary 3 3


CFLSC workook

YR WK C L TEAM OPP PS L
2000 WK4
2000 WK4
2000 WK4
2000 WK4 B A EDM BC 36 1.0
2000 WK4
2000 WK4
2000 WK4
2000 WK4 B H BC EDM 25 -1.0
2000 WK4
2000 WK4
2000 WK4
2000 WK4 W A HAM TOR 29 0.0
2000 WK4
2000 WK4
2000 WK4
2000 WK4 W H TOR HAM 27 0.0
[/b] :biggrin:
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.

Watch MrExcel Video

Forum statistics

Threads
1,129,553
Messages
5,636,976
Members
416,953
Latest member
broexc

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
Top