How to Compare Two Columns in Excel


Comparing the columns in Excel is a powerful way for analysing and understanding data and can help us in identifying the patterns and trends that we may not be able to find out through manual inspection. Using Excel formulas and techniques we can quickly and easily compare columns and gain insights that can help us in making better decisions. There are several ways to compare two columns in Excel. By using formulas like IF, COUNTIF, INDEX/MATCH and VLOOKUP. But before we compare we need to understand the type of data you are working with, like whether it is a numeric, text or date/time data. This will help you to choose the suitable tool or technique to compare it. For example if you are working with text data, you can use the IF function to compare and find the matching and non-matching entries. If you are working with numeric data, you may use a function like COUNTIF function to count the number of matching entries.

Methods to compare two columns in excel:

1. Using Equal operator

One of the simplest ways to compare values in two columns in Excel is using an equal operator. Let us understand how we can compare two columns using equal operators with an example.

  • First select a cell where you want to write the result
  • Then type “=” sign
  • Select the value in the first column which you want to compare then write “=” and select the value in another column and 
  • Hit the enter button


Want to gain knowledge in Excel? Then visit here to learn Excel Training!

Excel Training

  • Master Your Craft
  • Lifetime LMS & Faculty Access
  • 24/7 online expert support
  • Real-world & Project Based Learning

2. Using Conditional formatting:

a) Comparing two columns to highlight the duplicate values in the columns:

It is a feature in Excel that will highlight cells in one column that match/do not match with another column. To highlight the cells that have same values follow the below steps:

1. Select the two columns you want to compare.

2. Then go to the home tab and select the conditional formatting option.

3. Select the option Highlight cells Rules, then click on duplicate values option


4. Duplicate values dialogue box appears on the screen. Select an option from the dialogue box how the duplicate values must look like. In this Example I have chosen Green fill with dark green text. You can choose any option you like and click ok.

5. Then the duplicate text will be highlighted with green colour with dark green text

b) Comparing two columns to highlight the Unique values in the columns:

Now to highlight the cells that have different values follow the below steps:

  1. Select the two columns you want to compare.
  2. Then go to the home tab and select the conditional formatting option.
  3. Select the option Highlight cells Rules, then click on duplicate values option
  4. Duplicate values dialogue box appears on the screen. Select an option Unique instead of Duplicate from the dialogue box and also how the duplicate values must look like. In this Example I have chosen Light Red fill with dark Red text. You can choose any option you like and click ok.
  5. Then the unique text will be highlighted with light Red colour with dark Red text

 

Equal operator, Generals, compare-two-columns-in-excel-description-0, Generals, compare-two-columns-in-excel-description-0, Generals, compare-two-columns-in-excel-description-0, Equal operator, Generals, compare-two-columns-in-excel-description-0, Generals, compare-two-columns-in-excel-description-0, Equal operator, Generals, compare-two-columns-in-excel-description-0, , Generals, compare-two-columns-in-excel-description-1, Generals, compare-two-columns-in-excel-description-1, Generals, compare-two-columns-in-excel-description-1, Equal operator, Generals, compare-two-columns-in-excel-description-0, Generals, compare-two-columns-in-excel-description-0, Equal operator, Generals, compare-two-columns-in-excel-description-0, , Generals, compare-two-columns-in-excel-description-1, Generals, compare-two-columns-in-excel-description-1, Equal operator, Generals, compare-two-columns-in-excel-description-0, , Generals, compare-two-columns-in-excel-description-1, , Generals, compare-two-columns-in-excel-description-2, Generals, compare-two-columns-in-excel-description-2, Generals, compare-two-columns-in-excel-description-2

Subscribe to our YouTube channel to get new updates..!

3. Using Formulas

Excel offers a number of Formulas to compare the cells in two columns. Let us go through them one by one.

a) IF:

It allows you to compare two cells in two columns and will return the result based on the condition we provide. Let us understand how to use the IF formula to compare the values in two columns with an example.

  1. First select a cell where you want to write the result
  2. Then type “=” sign
  3. Type IF and open bracket “( and write the condition and put a comma. Then write the value to be displayed if the condition is true in inverted commas and put a comma, and then write the value to be displayed if the condition is false in inverted commas.
  4. Close the bracket “)” and hit the enter button


b) COUNTIF:

We can use this formula to compare the two columns and count the number of cells that are the same or different. Let us understand how to use the COUNTIF formula to compare the values in two columns with an example.

  1. First select a cell where you want to write the result
  2. Then type “=” sign
  3. Type COUNTIF and open bracket “(“ and select the range, put a comma and select the range from another column to compare it
  4. Close the bracket “)” and hit the enter button


Top 30 frequently asked Excel Interview Questions !

Excel Training

Weekday / Weekend Batches

c) MATCH:

We can use the match function to compare two columns and find the position of a value in one column that matches with the value in another column. Let us understand how to use the MATCH formula to compare the values in two columns with an example.

  1. First select a cell where you want to write the result
  2. Then type “=” sign
  3. Type MATCH and open bracket “(“ and select the cell which you wanted to compare, put a comma and select the range from another column to compare, put a comma and write 0 to get exact match
  4. Close the bracket “)” and hit the enter button


d) VLOOKUP:

We can use the VLOOKUP function for comparing two columns and return a value if there is a match. Let us understand how to use the VLOOKUP formula to compare the values in two columns with an example.

  1. First select a cell where you want to write the result
  2. Then type “=” sign
  3. Type VLOOKUP and open bracket “(“ and select the cell which you wanted to compare, put a comma and select the range from another column to compare, put a comma and write 2 to return the value from the second column of the range – if a match is found, put a comma and write FALSE to get exact match
  4. Close the bracket “)” and hit the enter button

 

Conclusion:

In this blog, We have discussed different ways to compare two columns in Excel with examples. We hope you found this information useful. For more information on Excel stay tuned.



Source link

Leave a Reply

Subscribe to Our Newsletter

Get our latest articles delivered straight to your inbox. No spam, we promise.

Recent Reviews


UFT vs Selenium – Table of Content

What is selenium?

Selenium is an open source tool that made a sensation when this arrived in the business sector. It’s a free software with all the great features and was therefore able to quickly gain market share where QTP was a figurehead. Selenium provides various functions and is premised on larger-scale java scripting.

Become a master of Selenium by going through this HKR Selenium Training!

Why selenium?

Selenium facilitates testers to write the code to write the script in one operating system and to run the same test scripts on multiple browser platforms. WebDriver is now becoming part of the W3C standard for all browsers, thus designing browsers that will obviously support Selenium.

The important feature of this test automation tool is that it enables testers to test user experience modules, provides a wide variety of test options, results were compared and finally verifies whether or not they are consistent with the expected application behavior. Selenium’s “SENDKEYS” method equates test scripts written in different languages into Selenium in an accurate manner.

Selenium is considered as an important tool because of its attractive benefits such as transparency, platform independence, fosters continuous integration efforts, reduces the turnaround time and can be easily integrated with other automation tools as well.

Acquire Selenium with Ruby certification by enrolling in the HKR Selenium with Ruby Training program in Hyderabad!

UFT Training

  • Master Your Craft
  • Lifetime LMS & Faculty Access
  • 24/7 online expert support
  • Real-world & Project Based Learning

What is UFT?

It is one of most major trading players on the market. It primarily uses VB Scripting as its scripting language. It’s very simple to use and packed with advanced features. It uses the Object Repository to identify and capture objects. It can be easily integrated with many other automation tools, such as the Quality Center, and can update the results.

Why UFT?

UFT One/QTP is a Micro Focus automated testing testing tool that uses computerized analysis to assess glitches in a test application.UFT One is mainly used only for functional testing, regression and service testing. Using UFT One, you can optimize user behavior on a web-based or client-based software program and test and recognize bugs on the same actions for different users, different data sets, different Windows operating systems and/or different browsers.

UFT One is among the most popular commercial automation testing tools available in the market today. It is recognized for its simplicity of use and assistance by the vendor and a huge automation tester community. Due to this reason, qualified UFT One experts have always been in demand.

Brief History of Selenium

Jason Huggins developed Selenium in 2004 in Chicago. He was working at Thoughtworks as an Engineer on web app testing. Using JavaScript, Jason developed a program for testing. After using it, he realized the faults in manual testing. He named it JavaScriptTestRunner initially, but after that, he renamed it Selenium core and made it open source.

But still, there were some issues with using it. If someone uses JavaScript with a different domain name, it is forbidden to do so. For this, testers must install the Selenium Core and Web Servers, including web app testing that belongs to the same domain. Thus, another Engineer from ThoughtWorks, Paul Hammant, developed a Selenium Remote Control (RC) solution. Later, two other components, Selenium Grid and Selenium IDE, were created by two other professionals in 2006.

Brief History of Selenium

Further, in 2008 the core team of Selenium automation testing combined Selenium RC and Web Driver and brought Selenium 2. After many years changes & improvements took place in it, and it paved the way to release Selenium 3. 

Later, after a few years, Selenium became an open-source tool and has become a more powerful tool in the market. Many companies use Selenium for web automation testing of various apps. It makes web testing easier and faster.

Career Aspects 

Many organizations, especially those which are service-based, use Selenium which is now a popular open-source tool. Many companies use it for web and application testing. It is highly adaptable due to its flexibility to integrate with major programming languages. Further, there is good growth for Selenium in the future, and there are many job opportunities in this field. It is easy to learn and practice for everyone interested in web automation testing.

Brief History of UFT 

Mercury Interactive initially developed UFT in 1998, and its first version was Astra QuickTest. But later, in 2006, it was acquired by HP, and it became HP QTP. Later, in 2011, HP combined the two tools, “HP Service Test” and “HP QuickTest Professional,” and released a new device with the name “HP UFT 11.5” (Unified Functional Testing). Then, in 2016 was completely sold to another company Micro Focus which is managing and supporting UFT.

Career Aspects

UFT is a more powerful and useful tool in comparison to Selenium. Due to its huge license cost, many business entities still need to be ready to adopt this tool for automation. Moreover, UFT integrates with many tools, mostly paid tools. They are reducing their demand in the market.
For beginners in Automation, UFT is not the right fit to learn as there are only a few job opportunities for freshers. Further, it offers a free trial of 60 days, after which you need to buy the tool for further usage. It is a major drawback here. Also, there needs to be more information available on UFT, which makes it difficult to learn in-depth.

If you want to Explore more about Selenium? then read our updated article – Selenium Tutorial

Software Testings, uft-vs-selenium-description-0, Software Testings, uft-vs-selenium-description-2

Subscribe to our YouTube channel to get new updates..!

Comparison between Selenium and UFT:

Here we are going to discuss the key differences between UFT and selenium in detail.

Environment virtual support:

UFT: Deploy UFT to provide Citrix, AWS, and Azure virtual worlds, or run web and mobile tests from Docker containers.

selenium: It can also be integrated with those environments as well.

Software type:

UFT: UFT is a desktop based application.

Selenium: It is a s et of API’s

Cost:

UFT: It is a paid version, you need to purchase the license in order to use it.

Selenium: Where as selenium is an open source and free tool where you need to download and use it.

Application Type:

UFT: It supports web, mobile, API, hybrid, RPA, and enterprise apps.

Selenium: Selenium will only be used for web-based applications. It is a big downside of selenium over QTP.

Application Languages:

UFT: UFT could be used to test the functionality, the service layer and the database layer for all three layers of the application. 

Selenium: Selenium is only used to test the front end or the interface layer.

Supported Languages and Browsers:

UFT: It supports visual basic script language and chrome, firefox, safari and IE browsers.

Selenium: It supports java, python, ruby, perl PHP, javascript languages, and safari, firefox, chrome,IE, opera , headless browsers, etc.

Frequently asked Selenium Interview Questions and Answers !!

Operating systems and IDE:

UFT: Supports microsoft windows and comes with builtin UFT IDE

Selenium: Supports microsoft windows, apple OS X and linux, and comes with eclipse, intellij and other IDe that are supported by Java.

Supported technology:

UFT: Supports almost every significant software application and environment, such as SAP, Oracle, Salesforce, mainframes, embedded frameworks, headless browsers, and more.

Selenium: Selenium is struggling while automating SAP, Salesforce, mainframes applications.

Required coding skills:

UFT: You needed less programming knowledge as it provides keyword-driven testing that streamlines test creation and maintenance. Acquisition flows from the application screens and utilize UFT’s robust recording/replay capture technology.

Selenium: You need to have a good knowledge of programming language. For each Selenium binding, you need to know the programming language.

Test execution performance:

UFT: It needs more system resources. It can operate on Windows VM that uses more resources and needs more maintenance.

Selenium: Selenium requires less system resources and can be used in Windows or Linux VM applications. Linux VM is lightweight compared to Windows VM.

Tools integration:

UFT: Can be integrated with limited tools and mostly that are paid tools only

Selenium: Can be integrated with paid tools very easily.

Test reports:

UFT: Test reports are generated by default.

Selenium: For test reports these are needs to be integrated with other tools

Career Growth:

UFT: UFT offers less jobs, limited scope for expansion

Selenium: Selenium comes with more scope, more jobs in future as well.

Cost

UFT: HP UFT is a license-based testing tool that offers a trial period of 60 days to its new users. But after that, you need to buy the license, which costs much higher.

Selenium: Selenium has a good market share compared to HP UFT, an open-source tool. Many enterprises prefer to use it to manipulate the Selenium architecture as needed. Also, they can expect much better performance while conducting tests.

Join our Selenium Training In Kolkata today and enhance your skills to new heights!

UFT Training

Weekday / Weekend Batches

Conclusion

So we’ve seen so many discrepancies between UFT and Selenium. The main key driver is the automation cost. If you’ve a budget plan and you can manage QTP, it’s best because it has various characteristics. If your project has a lower budget, go to Selenium, but you need to make more effort.

Selenium is limited to the web page. If your test cases need to communicate with your desktop, such as uploading files, download files a file and checking, etc., Selenium may not function reliably in those instances, while UFT can easily streamline those contexts. Integrating Selenium with Test Management Tools is no easier than UFT. Selenium needs to be integrated with various reporting tools and managing.Selenium needs to be incorporated with various tools for reporting and managing data that are accessible in UFT by default. UFT scripts are going to be more stable than Selenium. UFT is rich in performance available to Selenium.

With the help of disitivcitve feature of UFT it can easily reduce the amount resources need in writing the scripts whereas selenium requires more resources to write lines of code.But you’re going to get less help available on UFT’s public online forums, but it has proper support as it’s a paid tool. 

Related Articles:



Source link