{"id":4628,"date":"2025-04-12T01:02:00","date_gmt":"2025-04-12T05:02:00","guid":{"rendered":"https:\/\/exceltheatre.com\/blog\/?p=4628"},"modified":"2025-08-06T15:18:47","modified_gmt":"2025-08-06T19:18:47","slug":"textjoin-excel-function-conditions","status":"publish","type":"post","link":"https:\/\/exceltheatre.com\/blog\/archives\/2025\/04\/12\/textjoin-excel-function-conditions\/","title":{"rendered":"TEXTJOIN Excel Function-Examples-Video"},"content":{"rendered":"<p>To quickly combine text and numbers from multiple cells in Excel, use the TEXTJOIN Excel function. Sarah shows the steps in this 3-minute video.<\/p>\n<p><!--more--><\/p>\n<p><iframe loading=\"lazy\" title=\"Use Excel TEXTJOIN Function to Combine Text With Conditions\" width=\"840\" height=\"473\" src=\"https:\/\/www.youtube.com\/embed\/E9G8LB0MMY8?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<h3>TEXTJOIN Function<\/h3>\n<p>The <a href=\"https:\/\/www.contextures.com\/exceltextjoinfunctionexamples.html\" target=\"_blank\" rel=\"noopener\">TEXTJOIN Excel function<\/a> is available in Microsoft 365, or in Excel 2019 and later versions<\/p>\n<p>It lets you combine text from multiple ranges, with the option to ignore empty cells.<\/p>\n<ul>\n<li><strong>Note<\/strong>: For earlier versions of Excel, see my <a href=\"https:\/\/www.contextures.com\/xlcombine01.html\">Combine Text\/Numbers<\/a> formula examples<\/li>\n<\/ul>\n<h3>TEXTJOIN Syntax<\/h3>\n<p>The TEXTJOIN syntax has 3 required arguments, and you can include optional text arguments:<\/p>\n<pre><code>TEXTJOIN(delimiter, ignore_empty, text1, [text2], ...)<\/code><\/pre>\n<ul>\n<li><strong>delimiter<\/strong>: Character(s) to use between the text items, such as a comma or semi-colon<\/li>\n<li><strong>ignore_empty<\/strong>: To ignore empty cells, use TRUE. To include empty cells, use FALSE.<\/li>\n<li><strong>text1, [text2], &#8230;<\/strong>: Text items you want to join.<\/li>\n<\/ul>\n<h3>Simple TEXTJOIN Formula<\/h3>\n<p>First, here\u2019s a basic example. In the screen shot below, there\u2019s a list of day names in cells B4:B10.<\/p>\n<p><a href=\"https:\/\/exceltheatre.com\/blog\/wp-content\/uploads\/2025\/04\/textjoinvidcond01.png\"><img loading=\"lazy\" decoding=\"async\" style=\"border: 0px currentcolor; display: inline; background-image: none;\" title=\"join all the days with a comma and a space, ignoring any blank cells\" src=\"https:\/\/exceltheatre.com\/blog\/wp-content\/uploads\/2025\/04\/textjoinvidcond01_thumb.png\" alt=\"join all the days with a comma and a space, ignoring any blank cells\" width=\"450\" height=\"275\" border=\"0\" \/><\/a><\/p>\n<p>To combine all the day names, separated by a comma and space, I put this formula in cell E5:<\/p>\n<ul>\n<li><code><strong>=TEXTJOIN(\", \", TRUE, B4:B10)<\/strong><\/code><\/li>\n<\/ul>\n<p>In the screen shot below, all 7 days are listed in cell E5, separated with a comma and a space<\/p>\n<ul>\n<li><strong>Sun, Mon, Tue, Wed, Thu, Fri, Sat<\/strong><\/li>\n<\/ul>\n<p><strong>Note<\/strong>: Any empty cells in the days list would be ignored.<\/p>\n<h3>Specific Days Only<\/h3>\n<p>In the next example, I want TEXTJOIN to make a list of specific days only.<\/p>\n<p>In the screen shot below, 3 days are marked with an x in column C\u00a0 \u2013 Mon, Wed and Fri.<\/p>\n<p>The business is only open on those days.<\/p>\n<p><code><strong><a href=\"https:\/\/exceltheatre.com\/blog\/wp-content\/uploads\/2025\/04\/textjoinvidcond03.png\"><img loading=\"lazy\" decoding=\"async\" style=\"border: 0px currentcolor; display: inline; background-image: none;\" title=\"textjoinvidcond03\" src=\"https:\/\/exceltheatre.com\/blog\/wp-content\/uploads\/2025\/04\/textjoinvidcond03_thumb.png\" alt=\"textjoinvidcond03\" width=\"195\" height=\"260\" border=\"0\" \/><\/a><\/strong><\/code><\/p>\n<h3>Add Condition in TEXTJOIN<\/h3>\n<p>To list only the days marked with an x, I can add a <strong><span style=\"color: #0000ff;\">condition<\/span><\/strong> to the TEXTJOIN formula.<\/p>\n<p>Here\u2019s my revised formula in cell E5, with <a href=\"https:\/\/www.contextures.com\/xlfunctions06_excel-if-function.html\" target=\"_blank\" rel=\"noopener\">an IF function<\/a> creating the condition:<\/p>\n<ul>\n<li><code><strong>=TEXTJOIN(\", \", TRUE, <span style=\"color: #0000ff;\">IF(C4:C10=\"X\", B4:B10, \"\")<\/span>)<\/strong><\/code><\/li>\n<\/ul>\n<h3>Formula Results \u2013 Marked Days Only<\/h3>\n<p>Now the formula checks <strong>IF<\/strong> the cells in C4:C10 have an &#8220;X&#8221;.<\/p>\n<ul>\n<li>If a cell contains &#8220;X&#8221;, the TEXTJOIN formula returns the day name from column B.<\/li>\n<li>If there\u2019s no &#8220;X&#8221;, the formula returns an empty string (<strong>&#8220;&#8221;<\/strong>).<\/li>\n<\/ul>\n<p>In the screen shot below, only the days marked with an &#8220;X&#8221; are listed in cell E5:<\/p>\n<ul>\n<li><strong>Mon, Wed, Fri<\/strong><\/li>\n<\/ul>\n<p><a href=\"https:\/\/exceltheatre.com\/blog\/wp-content\/uploads\/2025\/04\/textjoinvidcond02.png\"><img loading=\"lazy\" decoding=\"async\" style=\"border: 0px currentcolor; display: inline; background-image: none;\" title=\"textjoinvidcond02\" src=\"https:\/\/exceltheatre.com\/blog\/wp-content\/uploads\/2025\/04\/textjoinvidcond02_thumb.png\" alt=\"textjoinvidcond02\" width=\"451\" height=\"246\" border=\"0\" \/><\/a><\/p>\n<h3>Get the Workbook<\/h3>\n<p>To experiment with the TEXTJOIN function, you can get the workbook that Sarah used in the video.<\/p>\n<ul>\n<li>Go to the <a href=\"https:\/\/www.contextures.com\/exceltextjoinfunctionexamples.html\" target=\"_blank\" rel=\"noopener\">TEXTJOIN page on my Contextures site<\/a>,<\/li>\n<li>In the Download section, click the link to get the <strong>TEXTJOIN Examples <\/strong>workbook.<\/li>\n<\/ul>\n<p>There are several other files on that page too, and more examples and videos to explore!<\/p>\n<h3>More Text Functions<\/h3>\n<p>There are many more text function pages on my Contextures site. Check these out, for tutorials, videos, and Excel files to download for practice.<\/p>\n<p><a href=\"https:\/\/www.contextures.com\/xlcombine01.html\">Combine Text\/Numbers<\/a><\/p>\n<p><a href=\"https:\/\/www.contextures.com\/excelsplitnames.html\">Names, Split\/Reverse First and Last<\/a><\/p>\n<p><a href=\"https:\/\/www.contextures.com\/excelformulatextfunction.html\">FORMULATEXT Function<\/a><\/p>\n<p><a href=\"https:\/\/www.contextures.com\/excelcodecharfunctionexamples.html\">CODE and CHAR functions<\/a><\/p>\n<p><a href=\"https:\/\/www.contextures.com\/exceladdressfunction.html\">ADDRESS Function<\/a><\/p>\n<p>_________________<\/p>\n","protected":false},"excerpt":{"rendered":"<p>To quickly combine text and numbers from multiple cells in Excel, use the TEXTJOIN Excel function. Sarah shows the steps in this 3-minute video.<\/p>\n","protected":false},"author":2,"featured_media":4627,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_kadence_starter_templates_imported_post":false,"footnotes":""},"categories":[6],"tags":[],"class_list":["post-4628","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-excel-videos"],"_links":{"self":[{"href":"https:\/\/exceltheatre.com\/blog\/wp-json\/wp\/v2\/posts\/4628","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/exceltheatre.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/exceltheatre.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/exceltheatre.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/exceltheatre.com\/blog\/wp-json\/wp\/v2\/comments?post=4628"}],"version-history":[{"count":3,"href":"https:\/\/exceltheatre.com\/blog\/wp-json\/wp\/v2\/posts\/4628\/revisions"}],"predecessor-version":[{"id":4632,"href":"https:\/\/exceltheatre.com\/blog\/wp-json\/wp\/v2\/posts\/4628\/revisions\/4632"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/exceltheatre.com\/blog\/wp-json\/wp\/v2\/media\/4627"}],"wp:attachment":[{"href":"https:\/\/exceltheatre.com\/blog\/wp-json\/wp\/v2\/media?parent=4628"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/exceltheatre.com\/blog\/wp-json\/wp\/v2\/categories?post=4628"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/exceltheatre.com\/blog\/wp-json\/wp\/v2\/tags?post=4628"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}