You should now see the results of each comparison as “ Matching” or “ Not Matching” in column C.Ĭompare Two Columns and Highlight Matching Rows In the second row of column C (in cell C2), insert the formula: =IF(A2=B2,”Matching”,”Not Matching”). If the condition “A2=B2” is TRUE, it returns the text “ Matching”. The above formula uses an IF function to compare values in A2 and B2. If you want to get a more descriptive result, you can use a simple IF formula to return the text “ Match” when the values are the same and “ Mismatch” when the values are different.įor this, assuming you were working in cell C2 of our example, you would use the following formula: =IF(A2=B2,"Matching","Not Matching") For example, you could use the word “ Matching” for row items that match and “ Not matching” for row items that don’t match. So it makes sense to give a more descriptive result in column C. The above method works great if you’re the only one who will be working with the data.īut, a third-person going through your worksheet might not understand what exactly you’re implying by the words “TRUE” and “FALSE”. You should now see the results of each comparison in column C.Ĭompare Two Columns and Show Meaningful Text Double click the fill handle to copy the same formula to the rest of the cells in column C.In the second row of column C (in cell C2), insert the formula: =A2=B2.The above formula compares data in row 2 of both columns to see if they match. The formula you would use for a comparison like this is: =A2=B2 In our example, we are simply going to create a new column for the results, and display a TRUE if the pair of items in the same row match and a FALSE if they don’t. Google sheets just need to see which rows have the same values and which ones have different values and display the result in a third, blank column. All this calls for is just a row-by-row comparison. The simplest way to compare two columns is to find exact row matches. How to Compare Two Columns for Exact Row Matches To do this you will have to use the IMPORTRANGE function to be able to refer to the columns in another sheet. But you can as well use the same techniques to compare two columns that are in different Google Sheets documents. Also, note that in this case, we are comparing columns that are in the same worksheet.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |