Wednesday, December 03, 2008   
  Search   
 
Register  Login  
Forums  
     Minimize  

Welcome to MeraWindows forums.

Thank you for being at the Microsoft Windows Community Site. You may have to register before posting in forums. It's absolutely free. After registering, you can get all the benefits available to our registered members, you can access our Downloads section, you can participate in contests, etc. You can post in forums in English as well as in Hindi, in fact we encourage you to use Hindi in your posts. If you have any problem with registration or login, please contact us.

     
  


 
  Microsoft Windows Forums  Microsoft Offic...  Microsoft Excel  how to match 2 worksheets
Previous Previous
 
Next Next
New Post 2/5/2008 6:38 PM
User is offline jay
2 posts
Member


how to match 2 worksheets 

hi sir.. I need help in VBA or function to do this. I have 2 excel files. Both have 6 columns. Each column contains a number. 1 file may contain 1000 rows and the other has like 100+ rows... I want to do is I'd like to compare the original list which is file2 to file1 and count how many match numbers are there in each row outputing the # of match to a new workbook would do just great... i've been working for this project for 1 month already and haven't seen any solutions to it.. Hoping your the one who could help me... Thanks in advance.

EX of matching
file1
A1:F1 match with

file2
A1:F1 = output = 2 match
A2:F2 = output = 3 match
A3:F3 = output = 6 match

next

file1
A2:F2 match with

file2
A1:F1 = output = 3 match
A2:F2 = output = 1 match
A3:F3 = output = 4 match


and so on..

=COUNT(IF(B1:B100="A",IF(ISNUMBER(A1:A100),1)))

sorry if I make you confuse.. I'm not good at explaining.. but here it goes..
Yes i want to count how many times row1 of sheet1 matches each rows of sheet 2... output is: if row 1 of sheet1 found 3 match in row1 sheet 2... it will output 3... next output... row1 of sheet1 vs row2 sheet2... if found match 4.. it will output 4...

the algorithm is like this...

sheet1
A1:F1 vs

sheet2
A1:F1 = output = 2 match
A2:F2 = output = 3 match
A3:F3 = output = 6 match
...so on

next will be

sheet1
A2:F2 vs

sheet2
A1:F1 = output = 3 match
A2:F2 = output = 1 match
A3:F3 = output = 4 match


and so on..

you decide how would you display the output that would be easy for me to understand...thanks for your help... its is greatly appreciated....GOD SPEED

 
New Post 2/6/2008 5:11 AM
User is offline Ashish Mathur
89 posts
www.ashishmathur.com
Member




Re: how to match 2 worksheets 

Dear Jay,

How are you?  Thank you for your query.  In the file which you mailed to me yesterday, you had both the worksheets in one.  Therefore in  your question above, sheet 1 data is in columns A:F and shet 2 data is in columns I:N.  Given this, enter the following formula in cell H1 and copy downwards.  Please note that this is an array formula and therefore should be confirmed by Ctrl+Shift+Enter as against the conventional enter:  

The array formula is =SUM(COUNTIF($I22:$N22,$A$1:$F$1)).  Please remember to confirm by Ctrl+Shift+Enter.

This formula will compare A1:F1 with I1:N1, A1:F1 with I2:N2 and so on.

Please let me know how this works for you.

Anxiously awaiting your response.


For Microsoft Excel trainings in India, please visit http://ashishmathur.com/training.aspx

Regards,

Ashish Mathur - View Ashish Mathur's profile on LinkedIn
Microsoft Excel MVP
www.ashishmathur.com

 
New Post 2/6/2008 4:49 PM
User is offline jay
2 posts
Member


Re: how to match 2 worksheets 

thanks for the help... its greatly appreciated... GOD SPEED!!!

 
Previous Previous
 
Next Next
  Microsoft Windows Forums  Microsoft Offic...  Microsoft Excel  how to match 2 worksheets


   Get Your Own E-Mail Account @MeraWindows.com Minimize  
New Page 1 New Page 1
Show your cool quotient with @merawindows.com email account