# IF AND OR Formula

#### danniaus

##### New Member
Hello

I am trying to complete a formula for the following

I want to check that if the value in NMI MIRN State says VIC OR NSW OR QLD then the value in Annual Peak KWh needs to be greater than 100000 or IF NMI MIRN State says NSW or SA then the value in Annual Peak KWh needs to be greater than 160000

This is for each row

Any help appreciated

 Annual Peak KWh* Annual Shoulder KWh* Annual Off Peak KWh* Opportunity type* NMI/MIRN State* Eligible for Pricing? NMI Acquisition or Renewal Threshold Validation 180,000 0 80000 Acquisition VIC Not Eligible 180,000 0 80000 Acquisition VIC Eligible 200000 0 60000 Acquisition QLD Not Eligible 300000 0 40000 Acquisition SA Eligible

<colgroup><col><col><col><col><col><col><col><col></colgroup><tbody>
</tbody>

### Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.

#### RasGhul

##### Well-known Member
Maybe try;

=IF(AND(OR(E2="VIC",E2="NSW",E2="QLD"),A2>100000),">100000",IF(AND(OR(E2="NSW",E2="SA"),A2>160000),">160000"))

#### DanteAmor

##### Well-known Member
Hello

I am trying to complete a formula for the following

I want to check that if the value in NMI MIRN State says VIC OR NSW OR QLD then the value in Annual Peak KWh needs to be greater than 100000 or IF NMI MIRN State says NSW or SA then the value in Annual Peak KWh needs to be greater than 160000

This is for each row

Any help appreciated

Do not comment what is the result you need in case you meet any of the conditions.

You also have these letters "NSW" in the 2 conditions. If it is greater than 160,000 and "NSW" then you should first review this condition.

Try this:

Code:
``=IF(AND(A2>160000,OR(E2={"NSW","SA"})),">160",IF(AND(A2>100000,OR(E2={"VIC","NSW","QLD"})),">100","Does not meet"))``

#### danniaus

##### New Member
This worked perfectly thanks

#### DanteAmor

##### Well-known Member
This worked perfectly thanks

Replies
2
Views
393
Replies
5
Views
529

1,172,128
Messages
5,879,213
Members
433,410
Latest member
Roushcj

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