Comparing 2 columns with conditional results

[Closed]
Report
Posts
1
Registration date
Friday April 3, 2015
Status
Member
Last seen
April 3, 2015
-
Hello: I am a basic/intermediate excel user and new to this type of forum, but I am hopeful someone will be able to provide me with some help/solution. My spreadsheet has columns with 1s or 0s - where 1=yes and 0=no. What I would like to do is compare two columns (not beside each other) and return a result based on specified conditions.

This example below is what I want my spreadsheet to look like in the end. I would like to compare the data in col.C to col.E and return a result in col.B (the values in col.D are irrelevant). I've indicated the conditions to the right of each row that need to be satisfied in order to return the values I'm looking for:

B C D E
2 1 1 0 --> If C=1 AND E=0, THEN B=2
2 0 1 1 --> If C=0 AND E=1, THEN B=2
4 1 1 1 --> If C=1 AND E=1, THEN B=4
1 0 1 0 --> If C=0 AND E=0, THEN B=1

I don't know if I need a logic formula, a macro or something else entirely. I appreciate any help - thank you in advance!

Subscribe To Our Newsletter!

The Best of CCM in Your Inbox

Subscribe To Our Newsletter!