简体   繁体   中英

VBA - Compare data in 2 columns

I need help I am trying to compare data in 2 columns and paste text in a new sheet. Something like this

X = sheet1 Range column C

IF "x" is found in sheet2 column G then compare column E and Column G. If they match then paste x in sheet3 column1 and "same" in column2. If do not match, x in column 1 and "No match" in column2.

For what I believe you want to do, it can be done with just formulas.

在此处输入图像描述

However, if you're set on doing it with VBA, I'd be happy to help you come up with a simple bit of code.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM