ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   lookup and copy (https://www.excelbanter.com/excel-worksheet-functions/5326-lookup-copy.html)

MJ

lookup and copy
 
Hi, I am going through the newsgroup to see if someone has posted
something similar and have an idea as to what to do, but don't really
know how to do it.

On Sheet 1 I have column A with ID's.

On Sheet 2 I have column A with all unique ID's.

I want to go through each row on Sheet 1 Column A and check to see if
that ID already exists in Sheet 2 Column A. If it does already exist,
I will delete that row on Sheet 1 (I know how to do this), but if it
doesn't exist, I want to leave the row as is and append that value to
Sheet 2 Column A.

From what I gather, I should be using vlookup, index or match, but am
confused on how to do this.

Thanks for any/all help!!!

MJ

Trevor Shuttleworth

MJ

add a helper column and enter the formula in the first cell and drag down:

=IF(ISERROR(VLOOKUP(A1,Sheet2!A:A,1,FALSE)),"",1)

Now filter on the helper column and select the "1"s. Select the visible
rows and delete them. Switch off the filter, delete the helper column and
you're done.

Regards

Trevor


"MJ" wrote in message
om...
Hi, I am going through the newsgroup to see if someone has posted
something similar and have an idea as to what to do, but don't really
know how to do it.

On Sheet 1 I have column A with ID's.

On Sheet 2 I have column A with all unique ID's.

I want to go through each row on Sheet 1 Column A and check to see if
that ID already exists in Sheet 2 Column A. If it does already exist,
I will delete that row on Sheet 1 (I know how to do this), but if it
doesn't exist, I want to leave the row as is and append that value to
Sheet 2 Column A.

From what I gather, I should be using vlookup, index or match, but am
confused on how to do this.

Thanks for any/all help!!!

MJ




Frank Kabel

Hi
as a starting point see:
http://www.cpearson.com/excel/duplic...#InOneNotOther

--
Regards
Frank Kabel
Frankfurt, Germany


MJ wrote:
Hi, I am going through the newsgroup to see if someone has posted
something similar and have an idea as to what to do, but don't really
know how to do it.

On Sheet 1 I have column A with ID's.

On Sheet 2 I have column A with all unique ID's.

I want to go through each row on Sheet 1 Column A and check to see if
that ID already exists in Sheet 2 Column A. If it does already

exist,
I will delete that row on Sheet 1 (I know how to do this), but if it
doesn't exist, I want to leave the row as is and append that value to
Sheet 2 Column A.

From what I gather, I should be using vlookup, index or match, but am
confused on how to do this.

Thanks for any/all help!!!

MJ




All times are GMT +1. The time now is 05:22 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com