#1   Report Post  
 
Posts: n/a
Default Matching cells

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?

  #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?



  #3   Report Post  
Niek Otten
 
Posts: n/a
Default

Make sure you make a copy of your workbook first!
Don't be surprised if filling down 60000 cells takes very long. Do it in
parts if you prefer to see what happens.
--

Kind Regards,

Niek Otten

Microsoft MVP - Excel


"Niek Otten" wrote in message
...
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?





  #4   Report Post  
 
Posts: n/a
Default

Wow! Wow! and Wow! (Boy, you guys are good!)

Thanks a ton.

Gary

  #5   Report Post  
 
Posts: n/a
Default

Niek,

Help!

(See my original "matching cells" posting dated June 17).

I've changed by spreadsheet so:

Column A (formerly containing 60,000 cells)
is now Column B (containing 59,414 cells)

and Column B
is now Column I.

Accordingly, I've changed your formula to:

=IF(VLOOKUP(B1,$I$1:$I$59414,1)=B1,B1,"")

But now, the data in Column I is NOT being moved down to the matching
cells in Column B.

What am I doing wrong?

Thanks,

Gary



  #6   Report Post  
 
Posts: n/a
Default

I apparently deleted my June 17th posting so here it is:

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 down next to the cells in
Col A that have the matching 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
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?

============

Note: Neik's reply to that posting worked perfectly).

  #8   Report Post  
 
Posts: n/a
Default

Hi Dave,

(You've helped me out several times before so it's good to hear from
you again).

I need to see the contents of ALL of the cells, not just the matching
ones.

I worked little more on my revised formula and I got it to work! (I
can't see what I changed but, as long as it works, I'm happy!)

thanks,

Gary

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I compare data in two worksheets to find matching cells? Gary Excel Discussion (Misc queries) 4 March 2nd 06 09:04 PM
how to count matching cells? gary dickinson Excel Discussion (Misc queries) 6 May 9th 05 02:24 AM
Matching cells gcotterl Excel Discussion (Misc queries) 1 February 1st 05 10:32 PM
To safety merge cells without data destroyed, and smart unmerge! Kevin Excel Discussion (Misc queries) 0 December 30th 04 07:17 AM
Heps to design Locked/Unlocked cells in protected worksheet Kevin Excel Discussion (Misc queries) 0 December 30th 04 07:09 AM


All times are GMT +1. The time now is 02:56 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"