# If statements

#### JasonP

##### New Member
Hi

Is there a formula that can say for example, if the cells in A1:C1 = 0 and D1 =>0 then Gain if not loss?

Any help would be gratefully received

### Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type

#### texasalynn

##### Well-known Member
=IF(AND(A1:C1=0,D1>=0),"Gain","Loss")

Many Thanks

Jason

#### JasonP

##### New Member
Hi

Is there a way of saying for example, if the value in A1, B1, C1 (but not as a sum) are all greater than 0 and the sum of D1:G1 = 0 then "loss"?

Any help would be gratefully received

Regards

Jason

#### njimack

##### Well-known Member
=IF(AND(A1=0,B1=0,C1=0,SUM(D1:G1)=0),"loss")

Replies
5
Views
552
Replies
0
Views
240
Replies
3
Views
275
Replies
5
Views
1K
Replies
5
Views
234

1,191,547
Messages
5,987,209
Members
440,085
Latest member
MBecker79

### 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