# Logical functions

#### rami79

##### New Member
Hi guys,

I need to do the following:

IF A1="yes" and A2>0 then sum B1:B3, if not 0
IF A1="No" then Sum C1:C3

Thanks
Rami

### Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
is that one formula with three conditions or two formulas with two conditions

one with 3

=IF(AND(A1="yes",A2>0),SUM(B1:B3),IF(A1="no",SUM(C1:C3),0))

thanks

Replies
2
Views
68
Replies
8
Views
139
Replies
3
Views
152
Replies
6
Views
203
Replies
16
Views
481

1,203,103
Messages
6,053,539
Members
444,670
Latest member
laurenmjones1111

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back