{"id":3926,"date":"2019-01-09T13:06:54","date_gmt":"2019-01-09T13:06:54","guid":{"rendered":"http:\/\/officetuts.net\/excel\/?p=3926"},"modified":"2024-03-29T14:12:04","modified_gmt":"2024-03-29T14:12:04","slug":"if-cell-is-not-blank-then-do-if-statement","status":"publish","type":"post","link":"https:\/\/officetuts.net\/excel\/formulas\/if-cell-is-not-blank-then-do-if-statement\/","title":{"rendered":"Excel – If Cell is Not Blank, then do IF Statement"},"content":{"rendered":"\n
If-Cell-is-Not-Blank-then-do-IF-Statement<\/a>Download File<\/a><\/div>\n\n\n\n

If you want a formula that inserts a text, instead of leaving blank cells, you can use the ISBLANK function<\/a>. This function returns TRUE<\/strong> if a referenced cell is empty or FALSE<\/strong> if it contains any other value.<\/p>\n\n\n\n

Here\u2019s how it works.<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

In this example, only B4<\/strong> returns TRUE<\/strong>. B2<\/strong> returns FALSE<\/strong> because there is a space inside cell A2<\/strong> which is not visible here.<\/p>\n\n\n\n

Now, if we connect the ISBLANK function<\/a> with the IF function<\/a> we can decide what will be displayed inside the cell.<\/p>\n\n\n\n

We are going to use the following formula.<\/p>\n\n\n\n

=IF(ISBLANK(A1),\"Blank\",A1)<\/pre>\n\n\n\n

Formula explanation<\/strong><\/p>\n\n\n\n

If cell A1<\/strong> is blank, display the text \u201cBlank\u201d, otherwise display A1<\/strong>.<\/p>\n\n\n\n

Now, if you look at our modified example, you will see that it copies all values from the left side of the formula. Only one cell (B4<\/strong>) displays blank as the condition is met.<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

Maybe you would like to modify this formula to also display \u201cBlank\u201d in cell B2<\/strong> where there is a space.<\/p>\n\n\n\n

=IF(OR(ISBLANK(A1),TRIM(A1)=\"\"),\"Blank\",A1)<\/pre>\n\n\n\n

Formula explanation<\/strong><\/p>\n\n\n\n

The TRIM function<\/a> removes all leading and trailing spaces from a cell. If you have only spaces inside a cell, it will remove all of them.<\/p>\n\n\n\n

The OR function<\/a> returns TRUE if any of its arguments are TRUE<\/strong>. In other words, it returns TRUE<\/strong> if a cell is blank or a cell equals \u201c\u201d. Cell A2<\/strong> meets this requirement that\u2019s why it returns \u201cBlank\u201d.<\/p>\n\n\n\n

\"\"<\/figure>\n","protected":false},"excerpt":{"rendered":"

If you want a formula that inserts a text, instead of leaving blank cells, you can use the ISBLANK function. This function returns…<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23],"tags":[170,190],"yoast_head":"\nExcel - If Cell is Not Blank, then do IF Statement<\/title>\n<meta name=\"description\" content=\"Learn how to use the ISBLANK function in Excel and connect it with the IF function to return a specific value if a cell is not blank. Download the file to follow along.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/officetuts.net\/excel\/formulas\/if-cell-is-not-blank-then-do-if-statement\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Excel - If Cell is Not Blank, then do IF Statement\" \/>\n<meta property=\"og:description\" content=\"Learn how to use the ISBLANK function in Excel and connect it with the IF function to return a specific value if a cell is not blank. Download the file to follow along.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/officetuts.net\/excel\/formulas\/if-cell-is-not-blank-then-do-if-statement\/\" \/>\n<meta property=\"article:published_time\" content=\"2019-01-09T13:06:54+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-03-29T14:12:04+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/officetuts.net\/excel\/wp-content\/uploads\/sites\/2\/2019\/01\/isblank-example.png\" \/>\n<meta name=\"author\" content=\"Tomasz Decker\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Tomasz Decker\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/officetuts.net\/excel\/formulas\/if-cell-is-not-blank-then-do-if-statement\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/officetuts.net\/excel\/formulas\/if-cell-is-not-blank-then-do-if-statement\/\"},\"author\":{\"name\":\"Tomasz Decker\",\"@id\":\"https:\/\/officetuts.net\/excel\/#\/schema\/person\/41b0b6996aaa4c4127f86f3d24452d42\"},\"headline\":\"Excel – If Cell is Not Blank, then do IF Statement\",\"datePublished\":\"2019-01-09T13:06:54+00:00\",\"dateModified\":\"2024-03-29T14:12:04+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/officetuts.net\/excel\/formulas\/if-cell-is-not-blank-then-do-if-statement\/\"},\"wordCount\":243,\"publisher\":{\"@id\":\"https:\/\/officetuts.net\/excel\/#\/schema\/person\/41b0b6996aaa4c4127f86f3d24452d42\"},\"image\":{\"@id\":\"https:\/\/officetuts.net\/excel\/formulas\/if-cell-is-not-blank-then-do-if-statement\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/officetuts.net\/excel\/wp-content\/uploads\/sites\/2\/2019\/01\/isblank-example.png\",\"keywords\":[\"file\",\"pinterest\"],\"articleSection\":[\"formulas\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/officetuts.net\/excel\/formulas\/if-cell-is-not-blank-then-do-if-statement\/\",\"url\":\"https:\/\/officetuts.net\/excel\/formulas\/if-cell-is-not-blank-then-do-if-statement\/\",\"name\":\"Excel - If Cell is Not Blank, then do IF Statement\",\"isPartOf\":{\"@id\":\"https:\/\/officetuts.net\/excel\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/officetuts.net\/excel\/formulas\/if-cell-is-not-blank-then-do-if-statement\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/officetuts.net\/excel\/formulas\/if-cell-is-not-blank-then-do-if-statement\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/officetuts.net\/excel\/wp-content\/uploads\/sites\/2\/2019\/01\/isblank-example.png\",\"datePublished\":\"2019-01-09T13:06:54+00:00\",\"dateModified\":\"2024-03-29T14:12:04+00:00\",\"description\":\"Learn how to use the ISBLANK function in Excel and connect it with the IF function to return a specific value if a cell is not blank. Download the file to follow along.\",\"breadcrumb\":{\"@id\":\"https:\/\/officetuts.net\/excel\/formulas\/if-cell-is-not-blank-then-do-if-statement\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/officetuts.net\/excel\/formulas\/if-cell-is-not-blank-then-do-if-statement\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/officetuts.net\/excel\/formulas\/if-cell-is-not-blank-then-do-if-statement\/#primaryimage\",\"url\":\"http:\/\/officetuts.net\/excel\/wp-content\/uploads\/sites\/2\/2019\/01\/isblank-example.png\",\"contentUrl\":\"http:\/\/officetuts.net\/excel\/wp-content\/uploads\/sites\/2\/2019\/01\/isblank-example.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/officetuts.net\/excel\/formulas\/if-cell-is-not-blank-then-do-if-statement\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/officetuts.net\/excel\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Excel – If Cell is Not Blank, then do IF Statement\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/officetuts.net\/excel\/#website\",\"url\":\"https:\/\/officetuts.net\/excel\/\",\"name\":\"\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/officetuts.net\/excel\/#\/schema\/person\/41b0b6996aaa4c4127f86f3d24452d42\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/officetuts.net\/excel\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/officetuts.net\/excel\/#\/schema\/person\/41b0b6996aaa4c4127f86f3d24452d42\",\"name\":\"Tomasz Decker\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/officetuts.net\/excel\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/18cbe22837193574870ae40ba56bf712?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/18cbe22837193574870ae40ba56bf712?s=96&d=mm&r=g\",\"caption\":\"Tomasz Decker\"},\"logo\":{\"@id\":\"https:\/\/officetuts.net\/excel\/#\/schema\/person\/image\/\"},\"description\":\"Spreadsheet and Python enthusiast.\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Excel - If Cell is Not Blank, then do IF Statement","description":"Learn how to use the ISBLANK function in Excel and connect it with the IF function to return a specific value if a cell is not blank. Download the file to follow along.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/officetuts.net\/excel\/formulas\/if-cell-is-not-blank-then-do-if-statement\/","og_locale":"en_US","og_type":"article","og_title":"Excel - If Cell is Not Blank, then do IF Statement","og_description":"Learn how to use the ISBLANK function in Excel and connect it with the IF function to return a specific value if a cell is not blank. Download the file to follow along.","og_url":"https:\/\/officetuts.net\/excel\/formulas\/if-cell-is-not-blank-then-do-if-statement\/","article_published_time":"2019-01-09T13:06:54+00:00","article_modified_time":"2024-03-29T14:12:04+00:00","og_image":[{"url":"http:\/\/officetuts.net\/excel\/wp-content\/uploads\/sites\/2\/2019\/01\/isblank-example.png"}],"author":"Tomasz Decker","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Tomasz Decker","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/officetuts.net\/excel\/formulas\/if-cell-is-not-blank-then-do-if-statement\/#article","isPartOf":{"@id":"https:\/\/officetuts.net\/excel\/formulas\/if-cell-is-not-blank-then-do-if-statement\/"},"author":{"name":"Tomasz Decker","@id":"https:\/\/officetuts.net\/excel\/#\/schema\/person\/41b0b6996aaa4c4127f86f3d24452d42"},"headline":"Excel – If Cell is Not Blank, then do IF Statement","datePublished":"2019-01-09T13:06:54+00:00","dateModified":"2024-03-29T14:12:04+00:00","mainEntityOfPage":{"@id":"https:\/\/officetuts.net\/excel\/formulas\/if-cell-is-not-blank-then-do-if-statement\/"},"wordCount":243,"publisher":{"@id":"https:\/\/officetuts.net\/excel\/#\/schema\/person\/41b0b6996aaa4c4127f86f3d24452d42"},"image":{"@id":"https:\/\/officetuts.net\/excel\/formulas\/if-cell-is-not-blank-then-do-if-statement\/#primaryimage"},"thumbnailUrl":"http:\/\/officetuts.net\/excel\/wp-content\/uploads\/sites\/2\/2019\/01\/isblank-example.png","keywords":["file","pinterest"],"articleSection":["formulas"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/officetuts.net\/excel\/formulas\/if-cell-is-not-blank-then-do-if-statement\/","url":"https:\/\/officetuts.net\/excel\/formulas\/if-cell-is-not-blank-then-do-if-statement\/","name":"Excel - If Cell is Not Blank, then do IF Statement","isPartOf":{"@id":"https:\/\/officetuts.net\/excel\/#website"},"primaryImageOfPage":{"@id":"https:\/\/officetuts.net\/excel\/formulas\/if-cell-is-not-blank-then-do-if-statement\/#primaryimage"},"image":{"@id":"https:\/\/officetuts.net\/excel\/formulas\/if-cell-is-not-blank-then-do-if-statement\/#primaryimage"},"thumbnailUrl":"http:\/\/officetuts.net\/excel\/wp-content\/uploads\/sites\/2\/2019\/01\/isblank-example.png","datePublished":"2019-01-09T13:06:54+00:00","dateModified":"2024-03-29T14:12:04+00:00","description":"Learn how to use the ISBLANK function in Excel and connect it with the IF function to return a specific value if a cell is not blank. Download the file to follow along.","breadcrumb":{"@id":"https:\/\/officetuts.net\/excel\/formulas\/if-cell-is-not-blank-then-do-if-statement\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/officetuts.net\/excel\/formulas\/if-cell-is-not-blank-then-do-if-statement\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/officetuts.net\/excel\/formulas\/if-cell-is-not-blank-then-do-if-statement\/#primaryimage","url":"http:\/\/officetuts.net\/excel\/wp-content\/uploads\/sites\/2\/2019\/01\/isblank-example.png","contentUrl":"http:\/\/officetuts.net\/excel\/wp-content\/uploads\/sites\/2\/2019\/01\/isblank-example.png"},{"@type":"BreadcrumbList","@id":"https:\/\/officetuts.net\/excel\/formulas\/if-cell-is-not-blank-then-do-if-statement\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/officetuts.net\/excel\/"},{"@type":"ListItem","position":2,"name":"Excel – If Cell is Not Blank, then do IF Statement"}]},{"@type":"WebSite","@id":"https:\/\/officetuts.net\/excel\/#website","url":"https:\/\/officetuts.net\/excel\/","name":"","description":"","publisher":{"@id":"https:\/\/officetuts.net\/excel\/#\/schema\/person\/41b0b6996aaa4c4127f86f3d24452d42"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/officetuts.net\/excel\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/officetuts.net\/excel\/#\/schema\/person\/41b0b6996aaa4c4127f86f3d24452d42","name":"Tomasz Decker","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/officetuts.net\/excel\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/18cbe22837193574870ae40ba56bf712?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/18cbe22837193574870ae40ba56bf712?s=96&d=mm&r=g","caption":"Tomasz Decker"},"logo":{"@id":"https:\/\/officetuts.net\/excel\/#\/schema\/person\/image\/"},"description":"Spreadsheet and Python enthusiast."}]}},"_links":{"self":[{"href":"https:\/\/officetuts.net\/excel\/wp-json\/wp\/v2\/posts\/3926"}],"collection":[{"href":"https:\/\/officetuts.net\/excel\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/officetuts.net\/excel\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/officetuts.net\/excel\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/officetuts.net\/excel\/wp-json\/wp\/v2\/comments?post=3926"}],"version-history":[{"count":3,"href":"https:\/\/officetuts.net\/excel\/wp-json\/wp\/v2\/posts\/3926\/revisions"}],"predecessor-version":[{"id":13266,"href":"https:\/\/officetuts.net\/excel\/wp-json\/wp\/v2\/posts\/3926\/revisions\/13266"}],"wp:attachment":[{"href":"https:\/\/officetuts.net\/excel\/wp-json\/wp\/v2\/media?parent=3926"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/officetuts.net\/excel\/wp-json\/wp\/v2\/categories?post=3926"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/officetuts.net\/excel\/wp-json\/wp\/v2\/tags?post=3926"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}