vba - Copy a row from one sheet to a second one if it contains a certain value -
i new vba , found thought answer question not working. if on sheet1 column f contains value "a - 6:30pm" entire row copied second sheet.
this code using. going wrong?
sub test() each cell in sheets(1).range("f:f") if cell.value = "a - 6:30pm" matchrow = cell.row rows(matchrow & ":" & matchrow).select selection.copy sheets("a").select activesheet.rows(matchrow).select activesheet.paste sheets("a").select end if next end sub
try changing sheets("a").select sheets(1).select @ end of code.
Comments
Post a Comment