Using IF to check if a cell is blank - Microsoft Support

文章推薦指數: 80 %
投票人數:10人

Sometimes you need to check if a cell is blank, generally because you might not want a formula to display a result without input. ... In this case we're using IF ... Skiptomaincontent Officesupport Products Microsoft365 Office Outlook MicrosoftTeams OneDrive OneNote Windows MicrosoftEdge more... Devices Surface PCaccessories Mobile Xbox HoloLens Hardwarewarranties What'snew InstallOffice Account&billing Account MicrosoftStore&billing Templates Moresupport Communityforums Microsoft365Admins SmallBusinessAdmins Developer Education Reportasupportscam ExcelforMicrosoft365ExcelforMicrosoft365forMacExcel2021Excel2021forMacExcel2019Excel2019forMacExcel2016Excel2016forMacExcel2013Excel2010Excel2007ExcelforMac2011More...Less Sometimesyouneedtocheckifacellisblank,generallybecauseyoumightnotwantaformulatodisplayaresultwithoutinput. Inthiscasewe'reusingIFwiththeISBLANKfunction: =IF(ISBLANK(D2),"Blank","NotBlank") WhichsaysIF(D2isblank,thenreturn"Blank",otherwisereturn"NotBlank").Youcouldjustaseasilyuseyourownformulaforthe"NotBlank"conditionaswell.Inthenextexamplewe'reusing""insteadofISBLANK.The""essentiallymeans"nothing". =IF(D3="","Blank","NotBlank") ThisformulasaysIF(D3isnothing,thenreturn"Blank",otherwise"NotBlank").Hereisanexampleofaverycommonmethodofusing""topreventaformulafromcalculatingifadependentcellisblank: =IF(D3="","",YourFormula()) IF(D3isnothing,thenreturnnothing,otherwisecalculateyourformula). Needmorehelp? Expandyourskills ExploreTraining Getnewfeaturesfirst JoinMicrosoftInsiders Wasthisinformationhelpful? Yes No Thankyou!Anymorefeedback?(Themoreyoutellusthemorewecanhelp.) Canyouhelpusimprove?(Themoreyoutellusthemorewecanhelp.) Whataffectedyourexperience? Resolvedmyissue Clearinstructions Easytofollow Nojargon Pictureshelped Other Didn'tmatchmyscreen Incorrectinstructions Tootechnical Notenoughinformation Notenoughpictures Other Anyadditionalfeedback?(Optional) Submitfeedback Thankyouforyourfeedback! ×



請為這篇文章評分?