Professional Documents
Culture Documents
Section4.1:Introduction
Questions
1.NAMEDRANGES?
Selecttheadvantage(s)ofusinganamedrangeratherthanacellreference
Thecorrectanswerisshownabove.Thereisnospeedupwhenusingnamedrangesandthey
arenotcalculatedautomatically.Theydomakeyourformulasmuchmorereadableanddont
requiredollarsignstokeepthemreferencingthesameareawhendragged!Seethevideo
againfortheexplanation.
Consideringthescreenshotbelow,whichrangeofcellsdoyouthinkthenamedrange
"Teacher_Names"refersto?
ThecorrectanswerherewasA1:A10.Theexercisewasmeanttogetyouthinkingabout
wheretoapplynamedrangesandhownamingthemcanshowwhatdatatheycontain.
Section4.2:NameManager
Questions
1.DOWNSIDESTOENTIRECOLUMN(S)
Selectthedownside(s)ofusinganentirecolumnasanamedrangeratherthanaspecificset
ofcells
Thecorrectanswerisshownabove.Thistradeoffshouldalwaysbeconsideredwhen
decidingwhetherornottouseafullcolumnasanamedrange!
Section4.4:Intersection
Questions
1.TEACHERSANDDANCERS
Assumethatthegreencellsarethenamedrange"DanceTypes"andtheyellowcellsarein
thenamedrange"Teachers".Consideringthespreadsheetwe'veincludedinthisexercise,
whatwouldC4resolvetoifweput=Teachersinit?
ThesolutionisDanil.SinceTeachersisahorizontalnamedrange,cellC4willlookin
columnCofthenamedrangeandoutputthevalueitfindsthere.
Section4.5:TheBasmatiEffect
Questions
1.WHATISTHE[THENAMEOF]YOURFAVORITECOLUMN
Considerthescreenshotofaspreadsheetwe'veprovided.Whatwouldbeagoodnamefor
thenamedrangeofthecellshighlighedinyellow?
ThecorrectanswerherewasBrands.Again,thisquestionismeanttogetyouthinkingabout
wheretoapplynamedrangesandhowtonamethem.
Section4.6:Assignment
Theassignmentwastocompletethedancestudioplanning.Therearemanywaystosolve
thisbutwewillpresentoneofourfavoritesolutionsbelow.Wevebrokenupthesolutioninto
twoparts,eachwithacouplesteps,tomakeiteasiertofollow.
Part1:TheIntermediaryTable
Wewanttocreateanintermediarydatatablethatbringsourdataforteachersavailability
togetherwithourdataforteachersmaximumlevels.Thiswillmakesitmucheasierforusto
findwhoshouldteachwhatclassbasedonthosetwocriteria
Part1,Step1:CreateNewTable
Letsstartbycreatinganewsheetwiththedaysoftheweekascolumnsandtheteacher
namesasrows.Theemptysheetisshownbelow.Weusedaysoftheweekascolumns
ratherthanrowsbecausewewantthisdatatabletomatchthestructureofourscheduletable.
Part1,Step2:FillNewTableWithMaxLevels
Letsstartbyfillingthetablewithmaximumlevelsforeachteacher.WecanuseaVLOOKUP
thatlooksintheTeacherstableandreturnsthe4throw.Youcandragthisformulaacrossall
thecolumns,thendoubleclicktoautofilleachcolumnfromtheirrow2.
Part1,Step3:BringingintheAvailability
Forthisinformationtobeofanyusetous,weneedto
incorporate
theteachersavailability.
RememberthatwehaveadatatablethatshowsanXondayswhenateacherisavailable.
WecanuseanIFstatementwithareferencetotheAvailabilitytabletocheckthis.
Notethatwevealsoaddedaheadertotheteachernamecolumninpreparationforturning
thisintoadatatable.
Part1,Step4:CreatetheDatatable
Nowwerereadytoturnthisintoadatatabletobeusedtofillinourschedule.Tocreatea
datatable,selectournewdata(includingheaders),gototheinsertribbon,andclickTable.
Afterconfirmingthecellstouse,youhaveyourtable!Youcanrenameitusingthedesign
ribbonasshownbelow.WevenamedourstoMaxAvail,sincethistableshowstheavailability
ofteachersmaximumlevels.
Part2:CreatingtheSchedule
Nowwecanactuallycreateourschedule!Belowisanemptyschedule.ColumnAshowsthe
leveloftheclasstobetaughtandrow1showswhichdayoftheweekitwillbetaughton.We
wanttohaveteachernamesinthecellstoshowwhoisteachingwhatonwhichday.
Part2,Step1:WhichLevelsonWhichDays?
Letsfirstgettheinfoofwhichlevelistaughtonwhichdayintoourschedulesheet.Wecan
useasimpleVLOOKUPintotheLessonssheetforthis,asshownbelow.
Part2,Step2:ShowtheCellsThatNeedTeacherNames
Nowletsusethisbasistofindoutwhichcellsneedteachers.Sowewanttofindthecells
wheretherowslevel(ColumnA)isinthelistoflevelsineachcell.WecanaddaFIND
functionaroundourVLOOKUPtoachievethis,asshownbelow.
TheaboveformulaisforcellB2,dragitacrossallthecolumnsthendownoneachtofillthe
table.
Great,butnowwehavetheseuglyerrorcells,andwewantaspottoputoutdatatable
referenceifthereisindeedateacherneeded.Wecandobothofthesethingsbywrapping
ourformulainIFandISERRORfunctions.
Now,afterdraggingacrossallrowsandcolumnswegetthetableshownbelow.
Part2,Step3:WhichTeacher?
NowcomesthebitwhereweuseourawesomeMaxAvaildatatablefrompart1.Insteadof
printingwhichteacher?letsputaMATCHfunctionthatwillreturntherownumberofthe
teacherthatisavailabletoteachthatlevelforthatday.Thiswouldmakeourformulalooklike
this:
and,whendraggedtoallcells,ourtablenowlookslikethis.
The#N/Aoutputsshowthatthereisnoteacheravailabletoteachthatlevelonthatday.
Werealmostthere!NowthelaststepistowrapourMATCHfunctioninanINDEXfunction.
TheindexfunctionusestheMaxAvail[Name]asitsinputarrayandourMATCHfunctionresult
astherownumbertoreturn.Thefinalformulaandtableareshownbelow.
NotethatyoucannotdragthisformulahorizontallybecausetheMaxAvail[Name]reference
willautomaticallyshift,whichwedonotwant.Soyouneedtomanuallycopy/pastethe
formulaacrosseachcolumnbutcandragitdowntherowsafterwards.
Wehaveleftthe#N/Aoutputtokeepourformulafromgettingevenlongerbutthisshouldbe
fixedaswell!
Section4.6:BonusAssignment
Thisbonusassignmentwasmorestraightforwardthanpreviousones.Thegoalwastofillout
theSellerStocksheetbasedontheSuppliersstocksheet.Inthefiguresbelow,thetableon
therightistheSellersheetandthetableontheleftistheSuppliersheet.
SupplierSheet:
SellersSheet:
Inspiritofthisweekstheme,wesolvedtheexercisewithanamedrange.Belowthissolution
wewillalsoshowanalternativesolution.
UsingNamedRanges
Ifyouhaveakeeneye,youcanseethatthetwosheetshavethethesameexactIDs,which
areconvenientlysortedexactlythesameway!
Step1:CreatetheNamedRange
FirstweneedtocreatethenamedrangeSupplierInventoryfromtheBcolumninthe
Supplierssheetasshownbelow
Step2:FilltheSellerssheet
NowwesimplyreferencethenamedrangeintheothersheetandaddanIFformulatofillthe
cellwiththecorrectvalueasshownbelow.Notethatthissolutionwontworkifthesheetsare
sorteddifferently.
UsingVLOOKUP
Ifyouwanttohaveamorerobustsolutionthatcanhandlethesheetsbeingsorteddifferently,
useVLOOKUP!UsingthesameIFformulawrapperasabove,theformulabelowdoesthe
trickwhendraggeddowntheStockcolumnoftheSellerssheet.
Notetheoddwaytheapostropheishandledinthesheetname.