ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Value if two cells are true (https://www.excelbanter.com/excel-discussion-misc-queries/213837-value-if-two-cells-true.html)

Spendtoomuchtime

Value if two cells are true
 
Having difficulty with IF two cells are true.

Example, I want D1 to = C1 if, A1="Green" and B1="Blue"

D1 can also equal a value instead of equaling C1, say equal 1 if True and 0
if False. The problem I am having is it will equal 1 if either A1 or B1 are
True, need both to be True to value 1 (or C1, really either way would work
for my purposes).

Chris Premo

Value if two cells are true
 
Spendtoomuchtime wrote:

Having difficulty with IF two cells are true.

Example, I want D1 to = C1 if, A1="Green" and B1="Blue"

D1 can also equal a value instead of equaling C1, say equal 1 if True
and 0 if False. The problem I am having is it will equal 1 if either
A1 or B1 are True, need both to be True to value 1 (or C1, really
either way would work for my purposes).




=IF(AND(A1="Green", B1="Blue"),C1,FALSE)


--


JE McGimpsey

Value if two cells are true
 
One way:

=(A1="Green") * (B1 = "Blue")

In article ,
Spendtoomuchtime wrote:

Having difficulty with IF two cells are true.

Example, I want D1 to = C1 if, A1="Green" and B1="Blue"

D1 can also equal a value instead of equaling C1, say equal 1 if True and 0
if False. The problem I am having is it will equal 1 if either A1 or B1 are
True, need both to be True to value 1 (or C1, really either way would work
for my purposes).



All times are GMT +1. The time now is 12:21 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com