Excel - Copy this row from sheet 1 to next available line in sheet 2 if column H has blank sell -
if column h has empty cell copy whole row cell on onto new sheet next available row, rows can have amount of rows replicate through every row please.
sheet1 have potentially hundreds/thousands more rows:
...a.....b.....c......d......e......f......g.....h
data data data data data data data data
data data data data data data data data
data data data data data data data
data data data data data data data data
data data data data data data data data
data data data data data data data
data data data data data data data data
data data data data data data data data
sheet2 have brought through first sheet:
...a.....b.....c......d......e......f......g.....h
data data data data data data data
data data data data data data data
struggling days right , have tried multiple pieces of code , deleted whole lot , come on here. please :) :) :) :) :)
sub tgr() dim wssrc worksheet 'variable source data worksheet dim wsdst worksheet 'variable destination data worksheet set wssrc = sheets("sheet1") set wsdst = sheets("sheet2") intersect(wssrc.usedrange, wssrc.columns("h")) .autofilter 1, "=" 'filter blanks in column h 'copy resulting rows destination worksheet .offset(1).entirerow.copy wsdst.cells(rows.count, "a").end(xlup).offset(1) .autofilter 'remove filter end end sub
Comments
Post a Comment