# If and or statement

#### TL30N

##### New Member
Hi,

I have multiple conditions that I want to satisfy in an IF statement and am having a spot of bother.

In order to classify as new I want AD ABOVE 300, AE TO BE C, AF to be above 90%, AK to be "Stable Price" and AL to be between 4 weeks 201712,201713,201714 and 201715. I have the following below, but I'm having a problem

But it's not working, will somebody help please?

I think I need to add an OR in the dates, but not sure where.

Thanks

Last edited:

### Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a \$25,000 loan, 5% annual interest, 60 month loan.

#### BarryL

##### Well-known Member
without seeing your data set its hard to tell if this will work but try

#### pjmorris

##### Well-known Member
Hi,

Not quite sure what you mean by dates expressed as 201712 or 201715, but assuming they are dates then try this:

I can improve this if you can describe how you have arrived at these dates.

Regards

Last edited:

Try

#### TL30N

##### New Member
Try

 Hi both, AD AE AF AG AH AI AK AL Number of Stores PKCS (max) Branch Availability £ Price Wk-4 £ Price Wk-3 £ Price Wk-2 £ Price Wk-1 Stable Price F'cast Start Date S > P > K > C (Stock-in days %, Last Wk) (Thur, UK) (Thur, UK) (Thur, UK) (Thur, UK) () (Fncl Wk) 363 K 93% £ 134.00 £ 134.00 £ 134.00 £ 134.00 Stable Price 201651 362 P 29% £ 77.00 £ 77.00 £ 77.00 £ 77.00 Stable Price 201645 365 K 25% £ 79.00 £ 79.00 £ 79.00 £ 79.00 Stable Price 201446 Does the data below help? Peter, I couldn't get your formula to work and Barry, I didn't get the right answer with yours. Really appreciate the help.

<colgroup><col span="15"></colgroup><tbody>
</tbody>

#### gaz_chops

##### Well-known Member
Did mine work? It appears to!

Are the Year/Week No.s text or numbers?

Code:
``````[TABLE="width: 650"]
<!--StartFragment--> <colgroup><col width="65" span="10" style="width:65pt"> </colgroup><tbody>[TR]
[TD="width: 65"][/TD]
[TD="width: 65"][/TD]
[TD="width: 65"][/TD]
[TD="width: 65"][/TD]
[TD="width: 65"][/TD]
[TD="width: 65"][/TD]
[TD="width: 65"][/TD]
[TD="width: 65"][/TD]
[TD="width: 65"][/TD]
[TD="width: 65"][/TD]
[/TR]
[TR]
[TD]NEW[/TD]
[TD="align: right"]363[/TD]
[TD]C[/TD]
[TD="class: xl63, align: right"]93%[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Stable Price[/TD]
[TD="align: right"]201712[/TD]
[/TR]
[TR]
[TD]NOT NEW[/TD]
[TD="align: right"]400[/TD]
[TD]C[/TD]
[TD="align: right"]200[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Stable Price[/TD]
[TD="align: right"]201651[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
<!--EndFragment--></tbody>[/TABLE]``````

Last edited:

#### BarryL

##### Well-known Member
the below works for me

#### pjmorris

##### Well-known Member
Hi TL30N,

The key, I think, will be in your answer to Gaz's question about the format of the year/week. If I were to assume it is a number then this should work:

where the quote marks have been removed from the dates.

HTH.

#### TL30N

##### New Member
Thank you all very much, I managed to crack it with your help!

#### gaz_chops

##### Well-known Member
You're welcome, care to share what formula you used?

Replies
0
Views
139
Replies
1
Views
115
Replies
10
Views
400
Replies
4
Views
349
Replies
1
Views
364

1,191,576
Messages
5,987,386
Members
440,095
Latest member
yanaungmyint

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