# Stuck on IF

#### hineshines

##### New Member
I have 3 cells.

Q,S and U

If Q2 is less than 1, I need it to return 0
If Q2 equals1, I need it to return 1
If Q2 shows any number greater than 0, It will also populate cell U2 with number 1.
If S2 is greater than 0, it will show actual count.
If U2 equals 1 and S2 is greater than 0, I need to show S2 + U2.

=IF(Q2<1,0,IF(Q2=1,1,IF(S2>1,S2+U2)))

Any help is appreciated.

### Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.

#### StephenCrump

##### MrExcel MVP
Perhaps you can give us some examples to illustrate?

Based on what you've said, I think we're trying to define ??, where:

ABC
1ValueConditionDisplay
2Q2<10
3Q2=11
4Q2>1??

<tbody>
</tbody>

For ??, you have: IF(S2>1,S2+U2)

Based on what you've said previously, U2 will always be 1 in this scenario?

What do you want to show if S2<=1? Or should this first test perhaps be S2>0?

Last edited:

#### FDibbins

##### Well-known Member
wait, this formula is going INTO U2?
=IF(Q2<1,0,IF(Q2=1,1,IF(S2>1,S2+U2)))

If so, then you will get a circular reference error. A cell should not (normally) refer to itself

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

1,164,099
Messages
5,835,377
Members
430,353
Latest member
GS90

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