How do I compare values in two arrays in Excel?

I

Irrylath

I receive a spreadsheet from someone outside of my company's network. I take
this spreadsheet and add columns to either side for my company's data.
Example:

Original spreadsheet ("OS")
A B C
1 pear 1354 04-Sep-07
2 lime 2000 01-Jan-08

My spreadsheet ("MS")
A B C D E
1 data pear 1354 04-Sep-07 data
2 data lime 2000 01-Jan-08 data

When the other person adds or changes their information, they send me a copy
of their updated spreadsheet. What I would like to do is use a macro to
compare the array A1:C2 ("OS") to the array B1:D2 ("MS") to find the updates.

Can anyone help me?
 
M

Max

Maybe this easy formulas play-cum-autofilter serves what you're trying to do

Data assumed running in row2 down in both OS and MS

In MS,
Paste into E2, then array-enter the formula by pressing CTRL+SHIFT+ENTER
=IF(COUNTA(B2:D2)<3,"",ISNUMBER(MATCH(1,(OS!A$2:A$10=B2)*(OS!B$2:B$10=C2)*(OS!C$2:C$10=D2),0)))
Copy E2 down. Then apply autofilter on col E, choose: TRUE, to filter out
the lines corresponding to what's in OS - these will be the lines for your
update. Adapt the ranges to suit the actual extents of your data.
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:16,400 Files:356 Subscribers:53
xdemechanik
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top