How get NFL Yearly Schedule go into Teams worksheets with a button

Iron Contributor

 

 

I have NFL Yearly schedule and have teams worksheet to put teams schedule from Yearly Schedule worksheet.

The picture of 49ers team schedule 2021 is it should look like after I press button that is on is called Buttons worksheets

 

all the teams worksheet schedule will go into D15:E32 cells

 

 

I need help put code for all 32 teams schedules in each worksheets

 

 

Thanks You

for any help in advance

 

SF49ers164480

 

 

17 Replies

@sf49ers19238597 

I suggest you can do this using cell formulas and do it with a single lookup sheet.  In the attached I used a FILTER() function (requires Excel 365) and a drop down at the top to dynamically select which team to show.

I do not like on your file. I want same idea in my picture I posted. and put the schedule all 32 teams all at once

@sf49ers19238597  I copied the formula to everyone of your tabs ...

I saw problem on your file there is no BYE on the list

 

 

 

Thanks You

@sf49ers19238597 good catch.  let's try again.

Can tell me detail what formulas all part. I want all men

@sf49ers19238597 I think you want to know how the formula works:

=LET(l,SUBSTITUTE(
          FILTER(FullSchedule[WEEK]&"    "
                    &FullSchedule[ROAD TEAM]&FullSchedule[HOME TEAM],
                 (FulSchedule[ROAD TEAM]=$A$2)
                    +(FullSchedule[HOME TEAM]=$A$2))
          ,$A$2,""),
     w,TRIM(LEFT(l,3)),
     t,TRIM(MID(l,3,99)),
     f,XLOOKUP(SEQUENCE(18),--w,t,"BYE WEEK"),
     f)

So line 1 sets up the LET() statement and 1st variable "l" Uses FILTER to create a list of rows that has this sheet's Team Name (cell A2).  The list is in the format of [Week#]____[HomeTeam][RoadTeam].  So when the SUBSTITUTE replaces the [HOME TEAM] name with blank ("") it leaves a list of [Week#]____[OtherTeam]

Line 7 creates a variable "w" and strips the week#s from the list created in "l".  It simply takes the first 3 (LEFT) characters and then TRIMs off any extra space.

Line 8 creates "t" similar to the week number but strips off the Opponent's team name

Line 9 creates "f" which does a lookup of every week number (1-18) in the list of week numbers "w" and returns the corresponding opponent's team name ("t") and for week number(s) that don't exist it returns "BYE WEEK".

Line 10 just say to return "f" as the final list

 

The Home/Away list:

=LET(li,FILTER('YEARLY SCHEDULE'!A1:B273,
                ('YEARLY SCHEDULE'!B1:B273=$A$2)+('YEARLY SCHEDULE'!D1:D273=$A$2)),
     SWITCH(XLOOKUP(SEQUENCE(18),INDEX(li,,1),INDEX(li,,2),""),
               "","",
               $A$2,"AWAY",
               "HOME")
     )

in line 1 is the LET and 1st variable "li" which is a 2 column list with 1st column the week # and the 2nd column the HOME TEAM of each row that has this sheet's team name (as either home or road).

line 3 returns the list based on SWITCH.  Switch is like a special multiple IF statement.  It uses a value in this case found using XLOOKUP to determine which output to give.  The XLOOKUP checks week#s 1-18 and returns the corresponding HOME TEAM from the list created in "li" and if that week# isn't found it returns blank ("").  The SWITCH then says if the Value is "" then return "", if it is this sheet's team name (A2) then return "AWAY" and if anything else the return "HOME".

I have other file I try copy all formulas to my other file it not working what Ineed do


Thanks You

TLS49
So that is hard for me to say BUT here are a couple key things to check:
In the 1st formula it looks like I'm referring to the TABLE named FULLSCHEDULE this mean I probably highlighted the data on the 'YEARLY SCHEDULE' worksheet and under Home -> Format as Table and then under the TABLE table named it FULLSCHEDULE. This is a recommended way to work with table data but if you prefer you can replace each reference like FullSchedule[WEEK] with the corresponding cell reference like 'YEARLY SCHEDULE'!A1:A273 and replace the A1:A273 with B1:B273 etc.. for the corresponding column name.
Make sure the tab with the full schedule is still named 'YEARLY SCHEDULE'
Make sure the cells for schedule data are still in the same range
Make sure each tab has the team name in cell A2
I use formula for putting away or home. The formula is only putting all Home only. How get away in cells?

Thanks you Sf49ers164480


The HOME vs AWAY is based on
looking up each week for that team name and then if it sees that team name in the 'left' column it is an AWAY game but if it isn't then it assumes it is a HOME game but if there is an error it will just default as HOME. Please double check each cell range and reference. Make sure the team name is in cell A2 or the $A$2 reference is changed in each case. Make sure the team name is spelled the same.

@mtarler 

 

 

can help do same thing like other with this file. I try it not getting to work for me. I change table back to text.

 

 

@mtarler 

 

I need help with new file with Away/Home have #Value error

 

Thanks You

@sf49ers19238597 columns in the yearly schedule were C and F instead of D and G

Thanks You I did not notice that
Any possible to help with one team conference and division same type formulas without bye for conference and division worksheet that will multiple teams I will be add soon?

Than You