close

I need a clever Trevor to help me crack the following regular expression
find-replace issue (I think...):

I have the following 3 columns in an excel sheet.

Using the 1st row as an example, Column 1 reads
-arrItems1[0] = quot;-
Column 2 reads
-Aberdeen quot;;-
Column 3 reads
-arrItemsGrp1[0] = 1;-

As below:

arrItems1[0] = quot;Aberdeen quot;;arrItemsGrp1[0] = 1;
arrItems1[0] = quot;Addo quot;;arrItemsGrp1[0] = 1;
arrItems1[0] = quot;Adelaide quot;;arrItemsGrp1[0] = 1;
arrItems1[0] = quot;Alexandria quot;;arrItemsGrp1[0] = 1;
arrItems1[0] = quot;Alice quot;;arrItemsGrp1[0] = 1;
arrItems1[0] = quot;Aliwal North quot;;arrItemsGrp1[0] = 1;
arrItems1[0] = quot;Balfour quot;;arrItemsGrp1[0] = 1;

I need to replace in column 1 and colum 3, the number in the [] 's to
increment by one in the next row:

arrItems1[0] = quot;Aberdeen quot;;arrItemsGrp1[0] = 1;
arrItems1[1] = quot;Addo quot;;arrItemsGrp1[1] = 1;
arrItems1[2] = quot;Adelaide quot;;arrItemsGrp1[2] = 1;
arrItems1[3] = quot;Alexandria quot;;arrItemsGrp1[3] = 1;
arrItems1[4] = quot;Alice quot;;arrItemsGrp1[4] = 1;
arrItems1[5] = quot;Aliwal North quot;;arrItemsGrp1[5] = 1;
arrItems1[6] = quot;Balfour quot;;arrItemsGrp1[6] = 1;

Your knowledge will be much appreciated!!

Thanking you in anticipation!--
theonlymac
------------------------------------------------------------------------
theonlymac's Profile: www.excelforum.com/member.php...oamp;userid=32444
View this thread: www.excelforum.com/showthread...hreadid=522247wouldn't it just be something like

=quot;arrItemsGrp1[quot;amp;text(row(A1)-1,quot;0quot;)amp;quot;]quot;

copied down?
quot;theonlymacquot; wrote:

gt;
gt; I need a clever Trevor to help me crack the following regular expression
gt; find-replace issue (I think...):
gt;
gt; I have the following 3 columns in an excel sheet.
gt;
gt; Using the 1st row as an example, Column 1 reads
gt; -arrItems1[0] = quot;-
gt; Column 2 reads
gt; -Aberdeen quot;;-
gt; Column 3 reads
gt; -arrItemsGrp1[0] = 1;-
gt;
gt; As below:
gt;
gt; arrItems1[0] = quot;Aberdeen quot;;arrItemsGrp1[0] = 1;
gt; arrItems1[0] = quot;Addo quot;;arrItemsGrp1[0] = 1;
gt; arrItems1[0] = quot;Adelaide quot;;arrItemsGrp1[0] = 1;
gt; arrItems1[0] = quot;Alexandria quot;;arrItemsGrp1[0] = 1;
gt; arrItems1[0] = quot;Alice quot;;arrItemsGrp1[0] = 1;
gt; arrItems1[0] = quot;Aliwal North quot;;arrItemsGrp1[0] = 1;
gt; arrItems1[0] = quot;Balfour quot;;arrItemsGrp1[0] = 1;
gt;
gt; I need to replace in column 1 and colum 3, the number in the [] 's to
gt; increment by one in the next row:
gt;
gt; arrItems1[0] = quot;Aberdeen quot;;arrItemsGrp1[0] = 1;
gt; arrItems1[1] = quot;Addo quot;;arrItemsGrp1[1] = 1;
gt; arrItems1[2] = quot;Adelaide quot;;arrItemsGrp1[2] = 1;
gt; arrItems1[3] = quot;Alexandria quot;;arrItemsGrp1[3] = 1;
gt; arrItems1[4] = quot;Alice quot;;arrItemsGrp1[4] = 1;
gt; arrItems1[5] = quot;Aliwal North quot;;arrItemsGrp1[5] = 1;
gt; arrItems1[6] = quot;Balfour quot;;arrItemsGrp1[6] = 1;
gt;
gt; Your knowledge will be much appreciated!!
gt;
gt; Thanking you in anticipation!
gt;
gt;
gt; --
gt; theonlymac
gt; ------------------------------------------------------------------------
gt; theonlymac's Profile: www.excelforum.com/member.php...oamp;userid=32444
gt; View this thread: www.excelforum.com/showthread...hreadid=522247
gt;
gt;


Thanks! Appreciated!--
theonlymac
------------------------------------------------------------------------
theonlymac's Profile: www.excelforum.com/member.php...oamp;userid=32444
View this thread: www.excelforum.com/showthread...hreadid=522247

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()