vba - Skipping a column when copying highlighted cells from one table to another in the same sheet on excel 2007? -
i have problem when copying highlighted cells table another, skip 1 column, don't know problem exactly
here code:
sub copycat() activesheet.unprotect password:="p@ssw0rd" dim lr long, long, j long dim c range j = 1 lr = range("a" & rows.count).end(xlup).row each c in worksheets("mb").range("a15:o" & lr) if c.interior.colorindex = 3 c.copy destination:=worksheets("mb").range("j" & j) j = j + 1 end if next c activesheet.protect password:="p@ssw0rd" end sub
please me !!
Comments
Post a Comment