excel - VBA Testing two values, if one is different, copy -
i having fair amount of trouble code below: sub testemail() dim long dim lastrow long dim worksheet dim b worksheet dim strtext dim objdata new msforms.dataobject set = workbooks("book2").worksheets(1) set b = workbooks("book1").worksheets(1) lastrow = a.cells(rows.count, "a").end(xlup).row = 2 lastrow if not iserror(application.match(a.cells(i, 7).value, b.columns(3), 0)) , iserror(application.match(a.cells(i, 4).value, b.columns(11), 0)) a.range("d" & i).copy objdata.getfromclipboard strtext = replace(objdata.gettext(), chr(10), "") b.range("k" & ).value = b.range("k" & ).value & " / " & strtext end if next end sub i face 2 problems, 1 has me stumped , other due lack of knowledge: the line after if supposed check if 2 values (numbers) in both workbooks match, , if 2 ...