Você está na página 1de 4

SolutionsforWeek1ofEX101x:DataanalysistotheMAX()

Section1.3:Strings
Questions
1.WHATISTHEDATAYOUHAVE?
Howmanycolumnsdoestheimporteddatahave?
Thedatayouimportedshouldhavehad5columns:Symbol,Name,LastTrade,Change,and
Volume
Whatisthenameofthesecondcolumn?
ThenameofthesecondcolumnisName
Note:Bothoftheseanswerscanbeverifiedbyusingthespreadsheetprovidedbyusforthose
havingtroublewithimporting.

2.THEFINDFUNCTION
WhatshouldbethefirstargumentoftheFINDfunctioninthiscolumn?
ThefirstargumentoftheFINDfunctionwas,whichfindsthespaceinthetextintheChange
column.

3.THELEFTFUNCTION
WhatisthefirstargumentfortheLEFTfunctioninrow8?
ThefirstargumentoftheLEFTfunctioninrow8wasD8,whichindicateswhichtexttobetaking
theleftsideof.

4.THETRENDFORMULA
Pleaseassembletherightformulaforthe2ndrowbydraggingthepiecesoftheformulatothe
correctplace.
Thisquestionwasdraganddrop,thesolutionwastheformulashownhere:

WefindthepositioninD2andthensubtractonesowegetthepositionofthelastletter
beforethespace.ThiswaywegrabonlythewordUporDownwithoutthespace.

Intheexercisesinthissection,youhadtocreateanewcolumninthestocksdatacalledTrend.
Theexpectedresultisshowbelow.

Section1.5:Conditionals
Questions
1.FINDTHEPROBLEM
SomethingiswrongwiththespreadsheetthatFeliennecurrentlyhas,doyouknowwhat?
Theproblemwiththespreadsheetwasthattheprofitcolumncalculationisbasedonwrong
information.Thecalculationwasmultiplyingthevalueofthesharestimesthetotalnumberof
sharesowned,ratherthanthenumberofsharesmeanttobesold.Pleaseseelecture1.5at
time2:45fortheexplanation.

Section1.7:Assignment

1.BYHAND!
Tomakesureyoufullyunderstandtheproblem,weaskyoutofirstanalyseonerowbyhand.
Forthiswehavechosenrow42.

Whatisthehousenumberandstreetofrow42?
Thehousenumberonrow42was423CarriageDrive

WhatistheStatecodeofrow42?
Thestatecodeonrow42wasRI

2.GETTINGPOSTAL
SinceweassumethatUSstatecodes+postalcodesarealwaysinthefollowingformat:"AB
12345"wecanquiteeasilyextractthemfromtheline.
Whichformulamatchestheentirestatecodeandpostalcodeofthe42ndrow?

Thestateandpostalcodetogetheraresimplyformedbythelast8charactersofthestring.

3.GETTINGPOSTAL
Nowthatwehavethecombinedresult,weneedtosplititintwotogetthestatecodeandthe
postalcode.Notethatinpractice,wewouldswap"RI02895"intheformulasbelowwiththe
formulafromthepreviousexercise.

Whichformulagetsthestateabbreviationfromthecombinedstring?

HereweuseLEFTtotakethefirsttwocharactersfromthestring

Whichformulagetsthepostalcodefromthecombinedstring?

HereweuseRIGHTtotakethelastfivecharactersfromthestring

4.HITTINGTHESTREET
Forthefinalexercisewewouldliketoextractthestreetwithhousenumberfromthestring.
Unfortunatelythestreetnamesarenotallequalinlength,sowewillrequiretheuseofmore
complexfunctions.

Whichformulawouldgetusthefullstreetwithhousenumberofrow18?

WhatwesayhereisthatwewanttofindthefirstcommaintheStringandthentakethetext
fromplace1totheplaceofthiscomma(butminus1,becausewedon'tactuallywantthe
commaitself).

Alternatively=LEFT(A18,FIND(",",A18,1)1)wouldalsowork,butthiswasnotoneofthe
options)

ExtractingtheCity
Thiswasnotoneoftheexercisesbutwethoughtwewouldshareoursolutionforextractingthe
cityasaswell.Toextractcity,wecanmakeuseofthelengthofthestreetnameandnumber
(usingtheLENfunction).RememberthatthestreetnameandnumberisincolumnB.

Você também pode gostar