I'm doing some copy-paste
functionality in VBA. I have to copy the entire row if the value in cell A1
matches with the value in the other workbook. Let's say (Sheet name is : Sheet1):
In this sheet, all the values in the cell is the sheet name of the workbook. So from this work book, I have this data (sheet name: conso):
So what I want to do is to find all the values in RangeA
that matches with the Cell values. For example: if Column A
in Sheet1
values matches with the value in Column A
in Conso
, then I have to copy the entire row and paste it in the sheet which is the sheetName
matches with the value in Column A
of Sheet1
. Thanks in advance.
Alot to try an explain in my code, but I believe it does exactly what you asked.
Snap shot of the WorkBook with the search Criteria and this is also the workbook in which the data will be pasted which had the "B1", "B2" , etc sheets.
Snapshot of the "DataBase" workbook with the B1, B2 reference in Column A
Result of the code seen below, where the Data in rows with B1 in Column A are based into Sheet B1 and then sam eiwth B2, etc etc
may be I didn't get your exact goal (the title is about copy between workbooks but your explanation doesn't mention different workbooks and deals with different worksheets only) but here comes a "metacode" I think you can follow to reach it