Compare Data Problem (using if / vlookup?)

AlvinGP

New Member
Joined
Oct 1, 2009
Messages
10
Hi - can anyone help me?
I want to compare two sets of data, A and B. A is large data set, and B contains the numbers that i want to find in A and hi lite them, and have the rest deleted. How can i do it with formula?

For example, as below i just want to hi lite only 6534 and 3456. Please help:confused:

A B
1234 6534
4214 3456
1236
6534
5678
3456
7578
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Hi Alvin, you can use Conditional Formatting to highlight the matching values.

Select the values in column A, click Conditional Formatting > New Rule > Use formula to determine...

Use the following formula, then set your Format (Fill color, font color, etc.):

=ISNUMBER(MATCH(A1,$B$1:$B$10,0))

You cannot delete cells using formulas, you would need a macro to do that. (Or use filters to hide them.)
 
Upvote 0
Hi - can anyone help me?
I want to compare two sets of data, A and B. A is large data set, and B contains the numbers that i want to find in A and hi lite them, and have the rest deleted. How can i do it with formula?

For example, as below i just want to hi lite only 6534 and 3456. Please help:confused:

A B
1234 6534
4214 3456
1236
6534
5678
3456
7578
You can highlight the matches using a formula in conditional formatting but you can't delete the non-matches with a formula.

What version of Excel are you using?
 
Upvote 0
Mr. mvptomlinson - thanks a lot. I tried and it works. The problem is as you said, i cannot delete it, and it wont work if B column were from other worksheet/book. Is there other way to solve this?

Actually column A is just part of bigger data which relates to other information in the same spreadsheet (other columns). And i need whole information, not just column A. :(

would appreciate any other comments. Thanks
 
Upvote 0

Forum statistics

Threads
1,224,602
Messages
6,179,844
Members
452,948
Latest member
UsmanAli786

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