excel - Macro to sort and align data in columns -
i want build off macro, aligns data in 2 separate columns.
sub macro1() dim rng1 range set rng1 = range([a1], cells(rows.count, "a").end(xlup)) rng1.offset(0, 1).columns.insert rng1.offset(0, 1) .formular1c1 = _ "=if(isna(match(rc[-1],c[1],0)),"""",index(c[1],match(rc[-1],c[1],0)))" .value = .value end end sub
this want add:
if item in column c not found in column a, copy values in column b below other values match, starting in cell right of first blank cell in column a. also, items in column not in column b, leave "-" in column b. below.
cola colb colc b b c c d d e e f - g s g s b d c e
Comments
Post a Comment