How to compare data on 2 different sheets in Excel file
To compare data on 2 different sheets but in the same Excel file, we have many different methods such as using VLOOKUP or using the COUNTIF function and combining with Conditional Formating to create different comparison effects. or no difference in data in two different sheets. But in this article of TipsMake.com, we will use COUNTIF and Conditional Formating methods to compare data.
First of all we have a column of data as follows in Sheet 1. It is a list of items on stock on day 1.
And on sheet two, we have a list of items to stock on day 2. Now we can use the COUNTIF function to calculate the number of duplicates of items compared to the first day.
Before you start writing the formula you need to limit the data to be compared in sheet 1 and give it a distinguished name.
Highlight the data range to select and then click on the name of the cell in the left corner of the sheet, enter a name for the range. The name you enter must be spaces without Excel or Excel will not be able to read the name of the data range.
Or you can also name the area by going to the Formulas ribbon on the toolbar and selecting Define Name in the Defined Names section .
Enter a name for the range in the Name box, then click OK to confirm the name.
Now that your data range in Sheet 1 has a custom name, you can call that range in a formula without having to write an address sign. This method is very convenient for using data on many different sheets.
The COUNTIF formula we need to use here to count duplicates for those two data columns is:
= COUNTIF (array of data to be counted, different conditions to count)
And for the example in the image, we have the function formula:
= COUNTIF (input1; A2)
With this formula we can count the number of times "School notebooks" appear in the first day of inventory data.
Next, you just need to copy the formula down by clicking on the lower right corner of the available formula box and dragging the mouse down.
As you will see a zero result shows that this item was never stocked in the first day.
The above steps can show you the specific number of items in the duplicated inventory but do not show the duplication right on the data column. We can do this by using the Conditional Formating function , creating a different format so that we can immediately see which item is the item without duplication when compared to the inventory data. first.
Highlight the array to compare, then go to the Home ribbon on the toolbar and select Conditional Formating located in the Styles section of this ribbon.
Click on the New Rule line .
Then the New Formatting Rule function dialog box will appear, select the last line of the list of rule types is Use a formula to determine which cells to format .
In the Format values where this formula is true box (format the cells with the following formula), enter the following formula:
= B2 = 0
To explain a bit for this. Because we need to color data cells without duplicates, it means that in that data line the result in the " Duplicate with Day 1 " column we just filled out with the COUNTIF formula is 0.
So when we fill in the condition for this cell, we need to include the condition that finds the zero cells in that " Duplicate with Day 1 " column .
You leave B2 as a non-fixed parameter cell so that it can be modified with every row in the column.
Then don't forget to change the format for the cell with the appropriate condition by going to Format .
Change the format of the cell to suit the conditions in the different tabs of the Format Cells dialog box , with Font being the font change, Border to change the border of the cell and Fill to fill the background color for that data cell. Then click OK to confirm.
After looking at a series of settings, click OK to start changing the format for the cells matching the conditions set.
As you will see, the boxes that match the conditions set out are items that do not coincide with the first day of storage will be colored blue on your box.
If you want to directly change the format for cells with non-duplicated data, you can use the Excel COUNTIF formula directly into the Format values where this formula is true .
From there, we have the formula for Format values where this formula is true :
= COUNTIF (input1; A2) = 0
And the results received:
Note: If you change the formula from = 0 to> 0, the cells with duplicate data from the first date will have a format change. This part, TipsMake.com will leave you guys to try it out.
The article about how to compare data on 2 different sheets of Dexterity Software is here, thank you for following our article. Hope you can understand the knowledge we want to impart and successfully implement it for our data.
You should read it
- How to Compare Data in Excel
- How to filter duplicate data from 2 Sheets in Excel
- How to link data, connect data between 2 sheets in Excel
- Tricks using Google Sheets should not be ignored
- How to Compare Data in Excel
- How to quickly delete multiple sheets in Excel
- How to print multiple sheets in Excel
- How to Open CSV Files
May be interested
- How to Open CSV Filescsv (comma-separated value: comma-separated values) are files that contain data from tables listed in plain text, such as email contact information. although csv files can be opened in many programs (such as editors), the data within this format will be most fully displayed in spreadsheet software, such as microsoft excel, openoffice calc or google sheets (google sheets). you will need to select 'open' from the 'file' menu, select the csv file and adjust the delimiter settings if the data is not displaying properly. the same steps can be applied on google sheets, but this requires you to upload the file to google servers. the work process will run more smoothly if you arrange data neatly and scientifically!
- How to use Vlookup function between 2 sheets, 2 different Excel fileshow to use vlookup function between 2 sheets, 2 different excel files. normally the vlookup function applies on the same file in a certain workbook, but in some cases where the work is not so simple, the condition area and the area you need to access the data belong to belongs to two other sheets. together
- Forgot password protected Excel file, what should you do?suppose in case if there is an excel file containing extremely important data and because you want to keep your data secret, you create a password for the excel file to ensure its safety and data protection. file. however, for a long time not to use, forgetting passwords is also common.
- How to copy and move Sheets in Excel simply and easilycopying and moving sheets in excel is an important operation to help manage data effectively. this article will guide you through quick, simple ways to do it, suitable for many versions of excel.
- How to compare data on 2 Excel columnsusers can compare data on 2 excel columns with the countif function.
- How to merge multiple sheets into 1 PDF file in Excel 2013when using office 2007 version and below when you want to convert into a pdf file, you add add-on but now with office 2013 with just a few simple steps, you can combine multiple sheets in excel into one pdf file.
- How to open CSV file when Microsoft Excel is not installedfor those cases where you don't have microsoft excel installed and want to read and edit the csv file, we can open the file via the online google sheets application.
- 5 reasons you should give up Excel and start using Google Sheetsgoogle sheets is a spreadsheet web application that works as part of the google docs toolkit. google sheets was released in 2006, nearly two decades after the first release of microsoft excel.
- How to Add a New Tab in Excelyou can add tabs in excel, called 'worksheets,' to keep your data separate but easy to access and reference. excel starts you with one sheet (three if you're using 2007), but you can add as many additional sheets as you'd like. open your...
- How to link data between spreadsheets in Google Sheetsmost of us are familiar with basic operations when using spreadsheets in google sheets such as using specific rows and columns, calculating, creating pie charts, columns, data lines, etc. however, today's article will show you how to link data between spreadsheet pages in google sheets.