still having problems filter?

edsjr

New Member
Joined
Mar 27, 2002
Messages
33
I have 2 files, one with about 27000 lines and the other with 30,000. Each line is different but the one with 30,000 has all of the ones that the one with 27,000 plus an extra 3000. I need to match up the similar lines between the 2 files. Each file contains the same 4 columns that are unique to the line they are on. I have tried filtering without luck but I am new with that function so I am not sure I did it correctly.

anyone have any ideas?

thank you, this is extremely important

Ed.
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Not sure i understand what you are asking? Do you want to find the 3000 extra lines or the 27000 that are the same? Do you wish to delete the extras, or the duplicates?
 
Upvote 0
I want to find the extra 3000 lines and seperate them out. More importantly I want to put like cells next to each other, which would also point out the extra 3000.

Each file has 4 columns, they represent the same things in both files. One is a manufacturer, one is a part number, one is the unit of measure and one is the price. I want to see which part numbers are in both files and compare the prices between the 2 files.

hope this clears it up and i really hope you have a solution.
 
Upvote 0
I think VLOOKUP is going to save your day.

Can be used for both of the suggested solutions.

Quick tutorial then, you have:

sheet1: 30K rows
sheet2: 27K rows, all of which in sheet1

ok, first select your dataset on sheet2 and give it a name, eg."source". This can be done by typing the name into the namebox (located to the left of the formula bar). Ensure that the first column that you select is the key info that matches to the other sheet, like the part number, other columns must be to the right of this info and would include unit of measure or price.

in your sheet1, lets suppose your key info (the part number) is in column A and you want to fill the result into column F, in cell F2 put the formula:

=VLOOKUP(A2,source,2,false)

this means, lookup value from [A2] of this sheet in the first column of the named range [source] and return the value from the second column of the named range. False means basically, only identify for exact matches (ie. don't lie to me!!!).


Where there is no match this formula will return an error, which you can suppress using TYPE...

=if(TYPE(VLOOKUP(A2,source,2,false))=16,"not found",VLOOKUP(A2,source,2,false))


...hope this does it for you, play with it anyway, D.
 
Upvote 0
oh, i almost forgot, once you are happy with the formula, use the fill button (on the bottom right hand corner of the cell when selected) to fill the formula down. If you have thousands of entries just double-click the fill button to fill to the bottom of the adjoining list.

also, vlookups are quite intensive on resources, so if it is a once off lookup that does not need to reference the source every time a change is made, then i suggest you get into the habit of copying your equations to values .... to do this select the whole column, then by using the right mouse button on the edge of the selection drag the selection away and drop it back where you dragged it from, then release the right mouse button and select "copy to values".

based on your example, you could do this whole process both ways, so that each sheet has reference to which items are included and which missing from the other sheet.
 
Upvote 0
ouch, sorry, one last point, you might want to copy the two worksheets to the same workbook (the same file) if you want to make the referencing easier.
 
Upvote 0
that didnt seem to do it, I cant get it to work at all. I even tried to rig it so it was definately there and still nothing. I copied the 27000 file to the right of the 30000 file and then put the command in.

thanks
Ed.
 
Upvote 0
ok, step one is to copy the sheets into the same workbook. is that ok?

then name the range from which lookup equations will reference... ok?

at what point does it not work?
 
Upvote 0
is there a common key on which to do the lookup or is the unique-ness a product of several fields combined?
 
Upvote 0
i've jsut seen your earlier postings on this subject, i'm pretty sure it's vlookup you need, if you like send me the workbook or a sample of the data and i'll send you an example...

daley_123@hotmail.com
 
Upvote 0

Forum statistics

Threads
1,214,405
Messages
6,119,320
Members
448,887
Latest member
AirOliver

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