Thread: Matching cells
View Single Post
  #2   Report Post  
Niek Otten
 
Posts: n/a
Default

In column C:

=IF(VLOOKUP(A1,$B$1:$B$60000,1)=A1,A1,"")

Fill down 60000 cells.

Copy Column C. Select B. Paste Special, check Values. Delete column C


--

Kind Regards,

Niek Otten

Microsoft MVP - Excel

wrote in message
oups.com...
A1 thru A10 contains sequentially-sorted data. B1 thru B6 contains
sequentially-sorted data which matches SOME (but not ALL) of the data
in Col A. For example.

A B
1 1 1
2 2 3
3 3 4
4 4 6
5 5 8
6 6 10
7 7
8 8
9 9
10 10

I need to move the data in the cells in Col B next to the cells in Col
A that have the same contents. For example:

A B
1 1 1
2 2
3 3 3
4 4 4
5 5
6 6 6
7 7
8 8 8
9 9
10 10 10

In my actual spreadsheet, Col A contains 60,000 cells and Col B
contains 23,000 cells.

Besides dragging and dropping, is there a better way to do this?