Using COUNTIF, COUNTIFS in Google Sheets to Sort ...
文章推薦指數: 80 %
Typing “=COUNTIF” into the formula bar in Google Sheets will auto-generate formula options from a list. Select “=COUNTIF” and navigate to the ... Advertisement Analytics&Data UsingCOUNTIF,COUNTIFSinGoogleSheetstoSort,AnalyzeData December31,2019•ArmandoRoggio Whetheryou’reresearchingkeywords,reviewingleadsources,oranalyzingcustomerattributesfromaCRMexport,GoogleSheets’COUNTIFandCOUNTIFSformulascanhelp. Thesetwospreadsheetformulaswillonlycountacell(fromarangeofcells)ifspecificcriteriaaremet. Recently,amultichannelretailerwantedtoanalyzefiveyears’worthofleadandconversiondatafromitscustomerrelationshipmanagementsoftware.Leadsmightcomefromtheretailer’swebsite,itsvariousdigitalmarketingefforts,offlineadvertising,orfolksjustwalkingintoastore. …amultichannelretailerwantedtoanalyzefiveyears’worthofleadandconversiondata… Thecompanysellsrelativelyexpensiveproductsthatrangefrom$10,000to$50,000each.Thus,itmaytakeafewcontactstocloseasale.Understandingwhichsourcesproduceleadscouldhelptheretailerunderstandhowtogetmorecustomers. Unfortunately,thecompany’sCRMdidnotprovidetherequiredreport.Soacoupleoffolksfromtheretailer’smarketingdepartmentexportedthedataincomma-separatedvaluesformat.ThisCSVfilewasuploadedtoaGoogleSheet,andthankstoCOUNTIFandCOUNTIFS,itwasfairlyeasytoidentifywhichleadsourcesproducedthemostsales. TodemonstratehowtoapplyCOUNTIFandCOUNTIFSformulas,I’llusesampledata. COUNTIF Thedatahasfourcolumns:anordernumber,theU.S.statefromwhichtheorderwasplaced,theleadsource,andthesaleamount.Fortheexamples,I’llfocusonjusttwoofthesecolumns:thestateandtheleadsource.Thenameofthesheetis“LeadData.”NoticethatIincludedthisnametherangeofcells. TheexampleorsampledataasitappearedinaGoogleSheet.Noticethefourcolumnsofdata;ourexampleswillfocusonstateandleadsource.Clickimagetoenlarge. IwillcreateasecondsheettoanalyzeleadsourcesbyU.S.state.Thissheetwillhaveacolumntolistthestates,thetotalcountforeachstate,andthecountandpercentageofthetotalforeachleadsource. AsecondsheetwillemploytheCOUNTIFandCOUNTIFSformulas.Itincludesapairofcolumns—“Count”and“Percent”— foreachleadsource.Eachstate’scountisinarow.Clickimagetoenlarge. IwillusetheCOUNTIFformulatogetthetotalnumberofordersoriginatingfromeachstate.The formulaacceptstwoparameters,therangeandthecriterion. =COUNTIF(range,criterion) Therangeisanysetofcellsinthecurrentsheetoranothersheet.Ourrangewillcomefromthe“LeadData”sheetandnotthecurrentone. Typing “=COUNTIF”intotheformulabarinGoogleSheetswillauto-generateformulaoptionsfromalist.Select“=COUNTIF”andnavigatetotherangeandthendragtoselectit. GoogleSheetswillrecognizetheCOUNTIFformulaasyoustarttotypeit.Clickimagetoenlarge. Whenacellcontainstext,thecriterionisquoted.Forourexample,IfirstwantedtogetacountofallofthesalestoCalifornia—designatedas“CA”inthecellsofthestatecolumn.ThisiswhattheCOUNTIFformulalookedlike: =COUNTIF('LeadData'!B2:B25,"CA") TherangeshouldappearasyouselectitintheGoogleSheets’formulabar.Thentypeacommaandthecriterionvalue.Clickimagetoenlarge. Thesectiondescribingthesheetandrangeuses‘LeadData’!B2:B25astherangeandthestate(“CA”)forthecriterion.Iftherangehadbeeninthesameorcurrentsheet,itwouldnothaveincludedthesheetname. Icanusethissameapproachtogetthecountforeachstateonthelist. UsetheCOUNTIFformulatoobtainacountforeachofthestatesinconsideration.Clickimagetoenlarge. COUNTIFS TherelatedCOUNTIFSformulawillacceptaseriesofrangesandcriterionpairs.Wecanuseittofindthenumberofleadsthatconvertedfromeachsource,suchasFacebook. TheformulaissimilartoCOUNTIF.Inthiscase,wearecountingonlyrowsthathave“CA”inthestatecolumn. =COUNTIFS('LeadData'!B2:B25,"CA") Tothis,weaddacomma,followedbyasecondrangeandasecondcriterion—Facebookinthisexample. =COUNTIFS('LeadData'!B2:B25,"CA",'LeadData'!C2:C25,"Facebook") TheCOUNTIFSformulawillallowforseveralseriesofrangeandcriterionpairsseparatedbyacomma.Clickimagetoenlarge. ChangingthecriterionforthestatewillgiveusacountoftheleadsfromFacebookthatconvertedconsumersfromeachstate.Forourexample,Ialsowantedtoknowthepercentageoftotalleadstheserepresented.SoIcanaddaslashandareferencetothetotalleadsforagivenstate. =COUNTIFS(('LeadData'!B2:B25,"CA",'LeadData'!C2:C25,"Facebook")/B3) UsetheCOUNTIFSformulaforeachstateandeachleadsource.Theresultingcountcanbedividedbythetotalnumberofconvertedleadsforthestatetogetapercentage.Clickimagetoenlarge. Operators YoucanalsoincludeoperatorsinthecriterionvalueforeitherCOUNTIForCOUNTIFS.Placetheseinsidethequotationmarkssurroundingthecriterionvalue. Herearesomeexamples. “<>CA”—Notequal“CA”where“<>”meansnotequal. “>10”—Greaterthan10. “<10”—Lessthan10. “>=10”—Greaterthanorequalto10. “<=10”—Lessthanorequalto10. Wildcards Finally,therearealsotwoavailablewildcardcharactersforcriterionvalues. ?—Matchesanysinglecharacter. *—Matcheszeroormorecontiguouscharacters. Tomatchanactual?or*,putatilde(~)infrontofit.Forexample,“~?”wouldmatchaquestionmark. 〈 PreviousArticle NextArticle 〉 ArmandoRoggio Bio • RSSFeed Management&FinanceCreateGoogleDocsfromaGoogleSheet Analytics&DataUsingExceltoForecastSales,Expenses,More Advertisement Popular 11NewSocialNetworksfor2022SalesReport:2021ThanksgivingDay,BlackFriday,Cyber...5ContentMarketingIdeasforJanuary202222TopLocalBusinessDirectories3WaysGoogle'sSearchConsoleImprovesOrganicClicks...TheBestEcommerceContentforInstagram OurPartners EmailNewsletter+FreeEbook 50GreatEcommerceIdeas PrivacyPolicy IndustryIQ SalesChannelsforthe2021HolidaySeason ZohoInventory BestSiteSearchPracticesforQ4andBeyond Doofinder ExecutiveGuidetoEcommerceReplatforming KalioCommerce Advertisement WebinarU InstantVideo+Ebook OperationalFoundationsofKPIDashboards EcommerceConversionMastery HowIOSSDrivesSalestoE.U.Consumers 3TipstoSucceedinInternationalEcommerce Advertisement EmailNewsletter+FreeEbook 50GreatEcommerceIdeas PrivacyPolicy x
延伸文章資訊
- 1COUNTIF vs. COUNTIFS in Google Sheets | Coupler.io Blog
Every Google Sheets user knows what the COUNT function is for. It returns the amount of numeric v...
- 2COUNTIFS - 文件編輯器說明
本功能僅適用於新版Google 試算表。 傳回根據多個條件而得出的範圍大小。 使用範本. COUNTIFS(A1:A10, ">20" ...
- 3COUNTIFS - 文件編輯器說明- Google Support - 星星公主
本功能僅適用於新版Google 試算表。 ... COUNTIFS(criteria_range1, criterion1, [criteria_range2, criterion2, ......
- 4COUNTIF - 文件編輯器說明
COUNTIF 只能根據單一條件尋找符合的項目。如要設定多個條件,請使用 COUNTIFS 或資料庫函式( DCOUNT 或 DCOUNTA )。 COUNTIF 沒有大小寫之分。
- 5What's Google Sheets alternative to CountIFS that works with ...
https://stackoverflow.com/questions/69589540/whats-google-sheets-alternative-to-countifs-that-wor...