View Single Post
  #3   Report Post  
Marianne
 
Posts: n/a
Default

This solution worked perfectly. Thank you very much for your help. You have
saved me many hours of manual labor. :-)

Marianne

"Jay" wrote:

I have an excel spreadsheet that I would like to be able to automate
the process of comparing two columns of data and then inserting blank
cells into the 2nd column which would continue to move the data in the
2nd column down to the next row. I do not want to insert a row.

here is sample data before
col1 col2 col3 col4
abbott joe baker sally
atkins ted conti greg
baker sally
conti greg fudd elmer
doe john
fudd elmer

After comparing the names should match up or the cell should be
blank. So the data would look like this.

col1 col2 col3 col4
abbott joe
atkins ted
baker sally baker sally
conti greg conti greg
doe john
fudd elmer fudd elmer

I would appreciate any suggestions to make this process go quicker.

....

The following works with the example. However, there may be unstated
assumptions in the problem statement, so proceed with care.

At the top of col5, put the formula:
=IF(ISERROR(VLOOKUP(A1,C:D,2,FALSE)), "",
IF(VLOOKUP(A1,C:D,2,FALSE)=B1,A1,""))

At the top of col6, put the formula:
=IF(ISERROR(VLOOKUP(A1,C:D,2,FALSE)), "",
IF(VLOOKUP(A1,C:D,2,FALSE)=B1,B1,""))

Extend these two down for as many rows as you need. Then hide col3 and
col4.