Question

WHAT ARE THE STEPS ON COMPARING TWO COLUMNS NOT BY EACH LINES BUT SEARCH WHOLE COLUMNS...

WHAT ARE THE STEPS ON COMPARING TWO COLUMNS NOT BY EACH LINES BUT SEARCH WHOLE COLUMNS FROM EXCEL TO COMPARE EACH AND GIVE RESULTS? I AM NOT LOOKING FOR A1=B1 I AM LOOKING FOR COLUMNS TO CHECK IF THE STRINGS ARE MATCHING OR NOT. NOT BY THE LINES BUT AS A WHOLE TWO COLUMNS TO CHECK IF IT MATCHES OR NOT

0 0
Add a comment Improve this question Transcribed image text
Answer #1

#Compare two columns for matches or differences in the same row

To compare two columns in Excel row-by-row, write a usual IF formula that compares the first two cells. Enter the formula in some other column in the same row, and then copy it down to other cells by dragging the fill handle (a small square in the bottom-right corner of the selected cell). As you do this, the cursor changes to the plus sign.

Formula for matches

To find cells within the same row having the same content, A2 and B2 in this example, the formula is as follows:

=IF(A2=B2,"Match","")

Formula for differences

To find cells in the same row with different content, simply replace "=" with the non-equality sign:

=IF(A2<>B2,"No match","")

Matches and differences

And of course, nothing prevents you from finding both matches and differences with a single formula:

=IF(A2=B2,"Match","No match")

Or

=IF(A2<>B2,"No match","Match")

#Compare multiple columns for matches in the same row

In your Excel worksheets, multiple columns can be compared based on the following criteria:

Find rows with the same values in all columns (Example 1)Find rows with the same values in any 2 columns (Example 2)Example 1. Find matches in all cells within the same row

If your table has three or more columns and you want to find rows that have the same values in all cells, an IF formula with an AND statement will work a treat.If your table has a lot of columns, a more elegant solution would be using the COUNTIF function:

=IF(COUNTIF($A2:$E2, $A2)=5, "Full match", "")

Where 5 is the number of columns you are comparing.

Example To Find matches in any two cells in the same row

If you are looking for a way to compare columns for any two or more cells with the same values within the same row, use an IF formula with an OR statement:

=IF(OR(A2=B2, B2=C2, A2=C2), "Match", "")
In case there are many columns to compare, your OR statement may grow too big in size. In this case, a better solution would be adding up several COUNTIF functions. The first COUNTIF counts how many columns have the same value as in the 1st column, the second COUNTIF counts how many of the remaining columns are equal to the 2nd column, and so on. If the count is 0, the formula returns "Unique", "Match" otherwise. For example:

=IF(COUNTIF(B2:D2,A2)+COUNTIF(C2:D2,B2)+(C2=D2)=0,"Unique","Match")

Add a comment
Know the answer?
Add Answer to:
WHAT ARE THE STEPS ON COMPARING TWO COLUMNS NOT BY EACH LINES BUT SEARCH WHOLE COLUMNS...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Read a list of names from a file. Insert the names into a binary search tree...

    Read a list of names from a file. Insert the names into a binary search tree that is a little different from what we discussed in class. For this tree, the left side will contain the larger values and the right side will contain the smaller values. In essence, it is the exact opposite of a normal binary search tree. Our tree will also be able to store duplicate names. Aside from a left and a right pointer for each...

  • I am an Amazon researcher comparing different characteristics in 5 species of frogs that live in...

    I am an Amazon researcher comparing different characteristics in 5 species of frogs that live in very different environments. I use the Amazon green frog as my control since there is lots of data on this particular frog and it lives on the rainforest floor. I then compare the other frogs to this control frog. I am looking at length of back leg, the distance between the eyes (center of one eye to the center of the other eye) and...

  • PLEASE GIVE STEPS FOR EACH ANSWER! THANK YOU!!! Comparing ABC and Plantwide Overhead Cost Assignments The...

    PLEASE GIVE STEPS FOR EACH ANSWER! THANK YOU!!! Comparing ABC and Plantwide Overhead Cost Assignments The Sabroso Chocolate Company uses activity-based costing (ABC). The controller identified two activities and their budgeted costs: Setting up equipment $270,000 Other overhead $900,000 Setting up equipment is based on setup hours, and other overhead is based on oven hours. Sabroso produces two products, Fudge and Cookies. Information on each product is as follows: Fudge Cookies Units produced 5,000 25,000 Setup hours 4,000 1,000 Oven...

  • Use BLAST to find DNA sequences in databases Perform a BLAST search as follows: Do an...

    Use BLAST to find DNA sequences in databases Perform a BLAST search as follows: Do an Internet search for “ncbi blast”. Click on the link for the result: BLAST: Basic Local Alignment Search Tool. Under the heading “Basic BLAST,” click on “nucleotide blast”. pMCT118_F   5’- GAAACTGGCCTCCAAACACTGCCCGCCG -3’ (forward primer) pMCT118_R   5’- GTCTTGTTGGAGATGCACGTGCCCCTTGC -3’ (reverse primer) Enter the pMCT118 primer (query) into the search window. (see Moodle metacourse page for the file – just copy and paste the sequence into the...

  • 4. Comparing the fit of the regression lines for two sets of data Aa Aa E...

    4. Comparing the fit of the regression lines for two sets of data Aa Aa E Examine each of the following scatter diagrams and the corresponding regression lines. Identify which line better fits its data. Graph I Graph 11 Next, calculate a measure of how close the data points are to the regression line. Following are the six pairs of data values for Graph I, along with the regression equation: 5.6 6.6 9.6 y = -0.25 + 1.44x Assignment 14...

  • A haploid strain of yeast is treated with a mutagen called EMS. The different steps in...

    A haploid strain of yeast is treated with a mutagen called EMS. The different steps in the treatment and the analysis are the following: Step 1: Two tubes, labeled A and B contain 0.2 ml each of same yeast liquid culture. The concentration of yeast cells in the liquid culture was determined by a measure of the turbidity of the culture. This concentration is 4.4 x 109 cells/ml. Step 2: In each tube (A and B) 1.5 ml of phosphate...

  • 1. What is the minimum number of locations a binary search algorithm will have to examine...

    1. What is the minimum number of locations a binary search algorithm will have to examine when looking for a particular value in a sorted array of 200 elements? (2 points) 1 6 7 8 200 2. In general, which of the following sorting algorithms is the MOST efficient? (2 points) Bubble sort Insertion sort Heap sort Merge sort Selection sort 3. Which of the following are quadratic-sorting algorithms? (2 points) I. insertion sort II. selection sort III. merge sort...

  • READ BEFORE YOU START: Solve each of the following question using 3 methods: pricing formulas, a...

    READ BEFORE YOU START: Solve each of the following question using 3 methods: pricing formulas, a financial calculator, and Excel. When calculating using the pricing formula (e.g. Price of perpetuity P = C/r), please write the original formula and the steps where you plug in the number for each variable, and your final answers. When solving via a financial calculator, please indicate the inputs and output variable (e.g. PMT, N, PV, I/Y, and FV). When solving it using Excel, learn...

  • The following data sets were taken from two automated filling lines (FLO1 and FLOS). An equal number of 60 packs were randomly sampled from each flling line and the weights of the filled packs we...

    The following data sets were taken from two automated filling lines (FLO1 and FLOS). An equal number of 60 packs were randomly sampled from each flling line and the weights of the filled packs were recorded in (g) along with the frequency of each weight interval, and illustrated in the following table Weight Interval 50-799 FLO1 FLO5 800-849 850-899 900-949 14 16 950-999 20 1000-1049 10 1050 1099 100-1149 1150-1199 Use a statistical software package (e.g., Minitab, SPSS, SAS, Matlab,...

  •    1st photo is the introduction. 2nd photo are the questions. Thanks in advance! 5 Comparing...

       1st photo is the introduction. 2nd photo are the questions. Thanks in advance! 5 Comparing Substrings Here you'll evaluate running times of algorithms whose input size is expressed using two parameters. Let T[l.n] and T'[1.n] be strings of length n, over a finite alphabet (For example, T and T' might be over the alphabet {A, C, G, T), and represent DNA strands.) A function Match indicates whether or not a letter of T matches a letter of T. That...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT