[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.0

compare columns

Asked by JAYRU in Microsoft Excel Spreadsheet Software

Tags: Microsoft, office, 2003, excel

The below code is basically to compare one cell in a column in one sheet to another cell in a column in another sheet and if that cell does not match copy  that intire row to another sheet.

Sub CompareSheets2()
Dim ws1, ws2 As Worksheet
Dim RowsA, i, counter As Long
Dim blnFound As Boolean
blnFound = False

Set ws1 = Sheets("SampleData") ' your sample data sheet
Set ws2 = Sheets("Search criteria") ' your sheetname
Set ws3 = Sheets("Results") ' your sheetname

Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
RowsA = ws1.Cells(Rows.Count, 1).End(xlUp).Row
RowsB = ws2.Cells(Rows.Count, 1).End(xlUp).Row
counter = 1

'copy values
For j = 1 To RowsB
    For i = 1 To RowsA
        If ws1.Cells(i, 1) = ws2.Cells(j, 1) Then
            blnFound = True
            Exit For
        End If
    Next i
    If Not blnFound Then
        ws2.Rows(j).EntireRow.Copy ws3.Cells(counter, 1)
        counter = counter + 1
    End If
    blnFound = False
Next j
Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic


End Sub

ws1 Sample data:
1      APPLE      ORANGE
2      APPLE      ORANGE
3      APPLE      ORANGE
_____________________________
ws2 search data:
4      DOG      CAT
5      DOG      CAT
6      DOG      CAT
______________________________
ws3 results sheet expected result:
4      DOG      CAT
5      DOG      CAT
6      DOG      CAT
Works perfect up to this point however if i change the search data to:
1      DOG      CAT
2      DOG      CAT
6      DOG      CAT
________________________________
The expected result should be:
6      DOG      CAT
________________________________
The result I get is:
1      DOG      CAT
2      DOG      CAT
6      DOG      CAT
_______________________________

Can someone help me figure this out.  I've posted this question before and the person helping me just disappeard and almost had it figured out.   Maybe someone has a different approach in comparing cells and doing something very similar to what i need.


 
Related Solutions
Keywords: compare columns
 
Loading Advertisement...
 
[+][-]03/13/08 09:32 AM, ID: 21117952Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zone: Microsoft Excel Spreadsheet Software
Tags: Microsoft, office, 2003, excel
Sign Up Now!
Solution Provided By: lynx20
Participating Experts: 1
Solution Grade: A
 
[+][-]03/11/08 11:34 AM, ID: 21098615Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/11/08 12:31 PM, ID: 21099177Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/11/08 12:54 PM, ID: 21099444Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/12/08 04:07 AM, ID: 21104639Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/12/08 11:33 AM, ID: 21109238Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/12/08 11:52 AM, ID: 21109417Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/12/08 01:10 PM, ID: 21110231Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/12/08 01:13 PM, ID: 21110255Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/13/08 04:36 AM, ID: 21115072Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/13/08 06:27 AM, ID: 21115930Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/13/08 07:27 AM, ID: 21116517Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-92 / EE_QW_2_20070628