{"id":1313,"date":"2018-04-03T00:54:46","date_gmt":"2018-04-02T18:54:46","guid":{"rendered":"http:\/\/xlfxs.com\/?p=1313"},"modified":"2018-04-03T00:54:46","modified_gmt":"2018-04-02T18:54:46","slug":"text-to-columns-dynamically-using-formulas","status":"publish","type":"post","link":"https:\/\/xlfxs.com\/?p=1313","title":{"rendered":"Text-to-Columns, dynamically using formulas"},"content":{"rendered":"<p>I often use the technique of concatenating columns into 1 cell with separators.<\/p>\n<p>Something like the CSV, 1 line that has all values for a single row (all columns for that row) into 1 text block.<\/p>\n<p>And then, because of that, I need to extract that back, into table<\/p>\n<p><!--more--><\/p>\n<p>I know there is &#8220;Text-to-Columns&#8221; in Excel, but I wanted that dynamically, so if source got changed, the columns output will be changed too.<\/p>\n<p>So, here is the example, having three formulas in two columns.<\/p>\n<p><strong>Formula 1<\/strong> in column E starting 11 down (Cell E10 just has the value of 1)<\/p>\n<p><code>=IFERROR(SEARCH($D$8,$D$7,E10+1),\"---\")<\/code><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1326\" src=\"http:\/\/xlfxs.com\/wp-content\/uploads\/2018\/04\/Screenshot_2.jpg\" alt=\"Screenshot_2\" width=\"488\" height=\"351\"><\/p>\n<p>&nbsp;<\/p>\n<p><strong>Formula 2<\/strong> in cell F11 only, to bring first item<\/p>\n<p><code>=IFERROR(MID($D$7,E10,E11-1),\"---\")<\/code><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1317\" src=\"http:\/\/xlfxs.com\/wp-content\/uploads\/2018\/04\/Block2Rows6.jpg\" alt=\"Block2Rows6\" width=\"507\" height=\"368\"><\/p>\n<p>&nbsp;<\/p>\n<p>Then, at last <strong>Formula 3<\/strong>, to get all additional columns from text block<\/p>\n<p><code>=IFERROR(MID($D$7,E11+LEN($D$8),E12-E11-LEN($D$8)),\"---\")<\/code><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1316\" src=\"http:\/\/xlfxs.com\/wp-content\/uploads\/2018\/04\/Block2Rows5.jpg\" alt=\"Block2Rows5\" width=\"504\" height=\"372\"><\/p>\n<p>&nbsp;<\/p>\n<p>I wanted to make it very clear and simple to show the case, data used in example is dummy data means nothing, just for sake of example.<\/p>\n<div id='gallery-1' class='gallery galleryid-1313 gallery-columns-3 gallery-size-thumbnail'><figure class='gallery-item'>\n\t\t\t<div class='gallery-icon portrait'>\n\t\t\t\t<a href='https:\/\/xlfxs.com\/wp-content\/uploads\/2018\/04\/Block2Rows2-2.jpg'><img loading=\"lazy\" decoding=\"async\" width=\"150\" height=\"150\" src=\"https:\/\/xlfxs.com\/wp-content\/uploads\/2018\/04\/Block2Rows2-2-150x150.jpg\" class=\"attachment-thumbnail size-thumbnail\" alt=\"\" \/><\/a>\n\t\t\t<\/div><\/figure><figure class='gallery-item'>\n\t\t\t<div class='gallery-icon portrait'>\n\t\t\t\t<a href='https:\/\/xlfxs.com\/wp-content\/uploads\/2018\/04\/Block2Rows3-2.jpg'><img loading=\"lazy\" decoding=\"async\" width=\"150\" height=\"150\" src=\"https:\/\/xlfxs.com\/wp-content\/uploads\/2018\/04\/Block2Rows3-2-150x150.jpg\" class=\"attachment-thumbnail size-thumbnail\" alt=\"\" \/><\/a>\n\t\t\t<\/div><\/figure><figure class='gallery-item'>\n\t\t\t<div class='gallery-icon landscape'>\n\t\t\t\t<a href='https:\/\/xlfxs.com\/wp-content\/uploads\/2018\/04\/Block2Rows5-Copy-2.jpg'><img loading=\"lazy\" decoding=\"async\" width=\"150\" height=\"150\" src=\"https:\/\/xlfxs.com\/wp-content\/uploads\/2018\/04\/Block2Rows5-Copy-2-150x150.jpg\" class=\"attachment-thumbnail size-thumbnail\" alt=\"\" \/><\/a>\n\t\t\t<\/div><\/figure><figure class='gallery-item'>\n\t\t\t<div class='gallery-icon landscape'>\n\t\t\t\t<a href='https:\/\/xlfxs.com\/wp-content\/uploads\/2018\/04\/Block2Rows6-Copy-2.jpg'><img loading=\"lazy\" decoding=\"async\" width=\"150\" height=\"150\" src=\"https:\/\/xlfxs.com\/wp-content\/uploads\/2018\/04\/Block2Rows6-Copy-2-150x150.jpg\" class=\"attachment-thumbnail size-thumbnail\" alt=\"\" \/><\/a>\n\t\t\t<\/div><\/figure><figure class='gallery-item'>\n\t\t\t<div class='gallery-icon landscape'>\n\t\t\t\t<a href='https:\/\/xlfxs.com\/wp-content\/uploads\/2018\/04\/Block2Rows7-Copy-2.jpg'><img loading=\"lazy\" decoding=\"async\" width=\"150\" height=\"150\" src=\"https:\/\/xlfxs.com\/wp-content\/uploads\/2018\/04\/Block2Rows7-Copy-2-150x150.jpg\" class=\"attachment-thumbnail size-thumbnail\" alt=\"\" \/><\/a>\n\t\t\t<\/div><\/figure><figure class='gallery-item'>\n\t\t\t<div class='gallery-icon portrait'>\n\t\t\t\t<a href='https:\/\/xlfxs.com\/wp-content\/uploads\/2018\/04\/Block2Rows1-2.jpg'><img loading=\"lazy\" decoding=\"async\" width=\"150\" height=\"150\" src=\"https:\/\/xlfxs.com\/wp-content\/uploads\/2018\/04\/Block2Rows1-2-150x150.jpg\" class=\"attachment-thumbnail size-thumbnail\" alt=\"\" \/><\/a>\n\t\t\t<\/div><\/figure><figure class='gallery-item'>\n\t\t\t<div class='gallery-icon portrait'>\n\t\t\t\t<a href='https:\/\/xlfxs.com\/wp-content\/uploads\/2018\/04\/Block2Rows4-2.jpg'><img loading=\"lazy\" decoding=\"async\" width=\"150\" height=\"150\" src=\"https:\/\/xlfxs.com\/wp-content\/uploads\/2018\/04\/Block2Rows4-2-150x150.jpg\" class=\"attachment-thumbnail size-thumbnail\" alt=\"\" \/><\/a>\n\t\t\t<\/div><\/figure>\n\t\t<\/div>\n\n<p>&nbsp;<\/p>\n<div class=\"row\">\n<div class=\"col-lg-6 col-md-6 col-sm-6 text-right\"><a class=\"btn btn-primary btn-lg\" href=\"http:\/\/xlfxs.com\/wp-content\/uploads\/2018\/04\/Block2Rows.xlsx\"><i class=\"fa fa-download\"><\/i> Download spreadsheet<\/a><\/div>\n<div class=\"col-lg-6 col-md-6 col-sm-6\"><a class=\"btn btn-primary btn-lg\" href=\"https:\/\/1drv.ms\/x\/s!An4iomsT7EVO19ITtr_JOXrHWB1TqQ\" target=\"_blank\" rel=\"noopener\"><i class=\"fa fa-cloud\"><\/i> Excel Online version<\/a><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>I often use the technique of concatenating columns into 1 cell with separators. Something like the CSV, 1 line that has all values for a single row (all columns for that row) into 1 text block. And then, because of that, I need to extract that back, into table<\/p>\n","protected":false},"author":1,"featured_media":1325,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[81,34,40,52],"tags":[],"class_list":["post-1313","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-iferror","category-len","category-mid","category-search"],"_links":{"self":[{"href":"https:\/\/xlfxs.com\/index.php?rest_route=\/wp\/v2\/posts\/1313","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/xlfxs.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/xlfxs.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/xlfxs.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/xlfxs.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1313"}],"version-history":[{"count":0,"href":"https:\/\/xlfxs.com\/index.php?rest_route=\/wp\/v2\/posts\/1313\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/xlfxs.com\/index.php?rest_route=\/wp\/v2\/media\/1325"}],"wp:attachment":[{"href":"https:\/\/xlfxs.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1313"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xlfxs.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1313"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xlfxs.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1313"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}