How to get reference id if 2 column values match in excel vba -
hi i'm new excel vba , started working on creating macro. have 2 sheets, sheet1 has 4 columns (id, refid, value, code) , sheet2 has 3 columns (refid, value, code). need fill sheet1 refid column sheet2 refid column comparing value & code columns of sheet1 , sheet2. possible using vlookup? options? when using vlookup , value looking for, has in first column of matrix searching in. recommend following. add column in sheet2 column a . fill values of value/code . new formula should this. =vlookup(c2/d2,sheet2!a$1:d$20,2,false) fill in column of refid in sheet1. column 2 in sheet 2 should refid . hth