Comparing column A with over 8000 lines to 7 other columns

Christine Butler

New Member
Joined
Dec 9, 2005
Messages
15
I need to know how to get specific data back. Column A has over 8000 lines
Columns b:h each have over 8000 lines of data. I need to match column
A with the same number (remember there are 8000 different or matching numbers in Column A) with columns b:h for any of the same numbers that may be in Column A. Can anyone help?
Thanks,
Chris
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Welcome to the board.

So... what would you like to happen if/when a match is found in, say, column D?
 
Upvote 0
Thanks for trying to help.

All of the results that match would need to be in either some column or just sorted out so I know which ones to remove.
 
Upvote 0
Still a couple more questions...

Are you removing them from column A or from columns B:H?

Do you just want the cell's contents cleared? Or do you want the data to shift?
 
Upvote 0
Comparing

I need to compare column A to columns b-i. If there is a match from the data in column a anywhere else in the worksheet, I need to delete the match that would be anywhere in columns b-i.
Thanks again,
Chris
 
Upvote 0
One way is:

Code:
For Each cell In Range("B1:I"&Range("I65536").end(xlup).row)
    Set my_match = Range("A:A").Find(cell)
    If Not my_match Is Nothing Then cell.ClearContents
Next
 
Upvote 0
More or less... just put it within your sub.

Such as:

Code:
Sub my_replace()
Dim cell As Range
For Each cell In Range("B1:I" & Range("I65536").End(xlUp).Row)
    Set my_match = Range("A:A").Find(cell)
    If Not my_match Is Nothing Then cell.ClearContents
Next
End Sub
 
Upvote 0
Thanks

Thanks for trying to help, but I'm obviously not that experienced with Excel.
I will try to play around with it. Thank you again.
Chris
 
Upvote 0

Forum statistics

Threads
1,214,822
Messages
6,121,765
Members
449,049
Latest member
greyangel23

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top