Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Ever so often I'd enjoy the ease and quickness of replace &amp; calculation Options as well as in general the quick handling &amp; modifying Options, when once again sitting in front of a dumped-file-lists or whatsoever.</p> <p>I never understood why they didn't include such an essential function right from the start, really.</p> <p>It's based on Adam's script, but with the extension to swap <code>CONCAT</code> from horizontal to vertical, while still keeping the delimiters in order.</p> <pre><code>Function CONCAT2D(Optional range, Optional delx As String, Optional dely As String, _ Optional xcell As String, Optional cellx As String, _ Optional swop As Integer) Dim xy(1), xyi(1), s(1) As Integer Dim out, cell, del, dxy(1) As String 'ReDim range(2, 1) 'Gen.RandomMatrix 4 Debugging 'For i = LBound(range, 1) To UBound(range, 1) ' For j = LBound(range, 2) To UBound(range, 2) ' Randomize ' range(i,j) = Int((100 * Rnd) ) ' Next 'Next out = "" If IsMissing(delx) Then : delx = "," : End If If IsMissing(dely) Then : dely = delx() : End If If IsMissing(xcell) Then : xcell = "" : End If If IsMissing(cellx) Then : cellx = xcell() : End If If IsMissing(swop) Then : swop = 0 : End If dxy(0) = delx() : dxy(1) = dely() xyi(0) = 1 : xyi(1) = 2 If swop = 0 Then : s(0) = 0 : s(1) = 1 Else s(0) = 1 : s(1) = 0 : End If If NOT IsMissing(range) Then If NOT IsArray(range) _ Then : out = xcell &amp; range &amp; cellx Else del = delx For xy(s(0)) = LBound(range, xyi(s(0))) To UBound(range, xyi(s(0)) For xy(s(1)) = LBound(range, xyi(s(1))) To UBound(range, xyi(s(1)) cell = range(xy(0), xy(1)) If cell &lt;&gt; 0 AND Len(Trim(cell)) &lt;&gt; 0 _ Then : If out &lt;&gt; "" Then : out = out &amp; del : End If out = out &amp; xcell &amp; cell &amp; cellx del = dxy(s(0)) End If Next : del = dxy(s(1)) Next End If Else out = "ERR" End If CONCAT2D = out End Function </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload