?
Solved

How to compare 3 columns in excel?

Posted on 2016-11-08
7
Medium Priority
?
161 Views
Last Modified: 2016-11-09
I want to compare the field in 3 columns in excel.
I need to check if they have the same content.
For instance if in field A24, C24, E24, I want to check if it has the same content.
If not, I need to be alerted.
Can this be done?
Thanks,
0
Comment
Question by:100questions
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
7 Comments
 
LVL 49

Expert Comment

by:Martin Liss
ID: 41879391
If Range("A24") = Range("C24") And Range("A24") = Range("E24") Then
    'Do nothing
Else
    Msgbox "Not the same"
End If

Open in new window

0
 

Author Comment

by:100questions
ID: 41879402
Thanks.
Do I simply add this in an Excel field, to the right of the data?
I need to do this fo many fields, approximately 600 rows of fields.
0
 
LVL 33

Accepted Solution

by:
Subodh Tiwari (Neeraj) earned 2000 total points
ID: 41879411
Why not apply conditional formatting to identify if A24, C24 and E24 have the same content?
To do so, select the cell A24 and make a New Rule for conditional formatting using the formula given below and format as per your choice. And then select the A24, copy the formatting using the Format Painter and paste into C24 and E24.
So if all the three cells contain the same content, these three cells would be highlighted with the color you chose during formatting.
In the attached, I have applied the conditional formatting for your reference.
=AND($A24&$C24&$E24<>"",$A24=$C24,$C24=$E24)

Open in new window

Conditional-Formatting.xlsx
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 33

Expert Comment

by:Subodh Tiwari (Neeraj)
ID: 41879413
In the attached, the conditional formatting is applied to the range A1:A600, C1:C600 and E1:E600. The borders are there just for reference, you may remove them.
Conditional-Formatting.xlsx
0
 

Author Comment

by:100questions
ID: 41879451
Thanks.
How do I change the sheet so that it refers to columns/fields, D12, I12, N12 instead, and for 700 rows down?
Thanks again.
0
 
LVL 49

Expert Comment

by:Martin Liss
ID: 41879503
Are you asking Expert Neeraj or me?
0
 
LVL 33

Expert Comment

by:Subodh Tiwari (Neeraj)
ID: 41879756
Select the range D12:D700 and make a new rule for conditional formatting using the formula given below...
=AND($D12&$I12&$N12<>"",$D12=$I12,$I12=$N12)

Open in new window

Same formula will be used for I12:I700 and N12:N700.

In the attached, the conditional formatting is applied to the above mentioned ranges.
Conditional-Formatting.xlsx
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question