Monday 15 March 2010

vba - Multiple first column in table next to others with regular expressions/excel function -



vba - Multiple first column in table next to others with regular expressions/excel function -

i have table in excel values:

caption | num1 | num2 | num3 | numn+1 aaa | 10 | 20 | 30 | ... bbb | 40 | 50 | 60 | ... ...and going...

i place [caption] column next each [numn+1] column in illustration below:

caption | num1 | caption | num2 | caption | num3 | caption | numn+1 aaa | 10 | aaa | 20 | aaa | 30 | aaa | ... bbb | 40 | bbb | 50 | bbb | 60 | bbb | ... ...and going...

i`m looking help solve regular look / excel functions / vba.

does work?

sub copycolumns() dim r range dim ws worksheet set ws = ' worksheet here set r = ws.columns(3) while r.cells(1, 1) <> "" ws.columns(1).copy r.insert set r = r.offset(0, 1) wend application.cutcopymode = xlnone end sub

excel vba excel-vba

No comments:

Post a Comment