Hello !

In the A column there are only 1s or 0s
In the B column there can be any positive or negative number.

I need a formula in the C column , that will give me back a ''1'' only when there is both a 1 in the A column and a positive number in the B column. If any of these conditions are not met , I should get back a ''0'' in the C column.

I attached a example excel file.
Thank you very much !

=if(and(a2=1,b2>0),1,0)

=n(a1*b1>0)

Thank you very much etaf, your solution works very well !
However a different problem arose for me.
Is it possible instead of having 5 results for the 5 examples to only have 1 result for the 5 examples ?
For instance , if any of the 5 examples is ''correct'' as defined by my previous conditions (A=1,B=positive) , to have a ''1'' appear in a single cell (let`s say G1) If none of the 5 examples is correct to have a ''0'' appear in the same cell.

using the N idea from Ghozi Alkatiri , never used before
try

=N(COUNTIFS(D10:D14,1,E10:E14,">"&0)>0)

OR with a standard IF

=IF(COUNTIFS(D10:D14,1,E10:E14,">"&0)>0,1,0)
or using A & B columns
=IF(COUNTIFS(A1:A10,1,B1:B10,">"&0)>0,1,0)

Change the range to much your actual data

There are currently 1 users browsing this thread. (0 members and 1 guests)