More help with OR

PritiOne

Active Member
Joined
Jun 2, 2004
Messages
357
I got the last one - can you help me with this one?

=IF(OR(PromoPricing?="Crunch Time Promo", PromoPricing2?= "Crunch Time Promo"),IF(VLOOKUP(S19,ProductTable,20,0)="Y","MS 3000 Promotion",IF(OR(PromoPricing?="SN Unbundled",PromoPricing2?="SN Unbundled"),IF(ISNUMBER(MATCH(NewProdList,SNUnbundledList,0)),"SN Promo")),IF(W19>0,"A","")&IF(X19>0," B","")&IF(Y19>0," C","")&IF(Z19>0," D","")&IF(AA19>0," E","")&IF(AB19>0%," F","")))
 

Some videos you may like

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.

PritiOne

Active Member
Joined
Jun 2, 2004
Messages
357
I just can't figure it out - I can get a result if I have both PromoPricing? and promoPricing2? set as one of the values I have in the formul, but if the values are different (should go to default calculations) the answer is FALSE...????

Here's my formula:

=IF(OR(PromoPricing?="Crunch Time Promo",PromoPricing2?="Crunch Time Promo"),IF(VLOOKUP(S20,ProductTable,20,0)="Y","MS 3000 Promotion",IF(OR(PromoPricing?="SN Unbundled",PromoPricing2?="SN Unbundled"),IF(ISNUMBER(MATCH(NewProdList,SNUnbundledList,0)),"SN Promo"))),IF(W20>0,"A","")&IF(X20>0," B","")&IF(Y20>0," C","")&IF(Z20>0," D","")&IF(AA20>0," E","")&IF(AB20>0%," F",""))
 

acw

MrExcel MVP
Joined
Feb 13, 2004
Messages
4,814

ADVERTISEMENT

Hi

On the quick test I did, seems to be OK. I didn't have anything in the named ranges so it went to default. As I didn't have anything in the row 20 cells, it defaulted to blank. Tested this by changing the "" in the default output to "xx" in one of the outputs.


Tony
 

Fergus

Well-known Member
Joined
Mar 10, 2004
Messages
1,174
Hi there,

You seem to have a problem after "MS 3000 Promotion" is the following IF intended to be the option if you don't find a "Y" in your look-up table or if neither PromoPricing? nor PromoPricing2? are equal to Crunch Time Promo.

As far as I can see the following formula will work except when you have no "Y" in your look-up table, for which you need to provide an option.

=IF(OR(PromoPricing?="Crunch Time Promo",PromoPricing2?="Crunch Time Promo"),IF(VLOOKUP(S20,ProductTable,20,0)="Y","MS 3000 Promotion"),IF(OR(PromoPricing?="SN Unbundled",PromoPricing2?="SN Unbundled"),IF(ISNA(MATCH(NewProdList,SNUnbundledList,0)),IF(W20>0,"A","")&IF(X20>0," B","")&IF(Y20>0," C","")&IF(Z20>0," D","")&IF(AA20>0," E","")&IF(AB20>0%," F",""),"SN Promo")))
 

Fergus

Well-known Member
Joined
Mar 10, 2004
Messages
1,174

ADVERTISEMENT

Furthermore, if both PromoPricing? and promopricing2? are blank the answer will be FALSE - is that what you want?
 

PritiOne

Active Member
Joined
Jun 2, 2004
Messages
357
If both promos are blank then I need this logic to kick in:

IF(W20>0,"A","")&IF(X20>0," B","")&IF(Y20>0," C","")&IF(Z20>0," D","")&IF(AA20>0," E","")&IF(AB20>0%," F",""),"SN Promo")))


If only one promo is selected, it should result as the answer for the applicable line items.
 

Fergus

Well-known Member
Joined
Mar 10, 2004
Messages
1,174
Hi again,

OK try this: =IF(OR(PromoPricing?="Crunch Time Promo",PromoPricing2?="Crunch Time Promo"),IF(VLOOKUP(S20,ProductTable,20,0)="Y","MS 3000 Promotion","No 'Y' entry in Product Table"),IF(OR(PromoPricing?="SN Unbundled",PromoPricing2?="SN Unbundled"),IF(ISNA(MATCH(NewProdList,SNUnbundledList,0)),"NewProdList No. not in SN Unbundled List","SN Promo"),IF(W20>0,"A","")&IF(X20>0," B","")&IF(Y20>0," C","")&IF(Z20>0," D","")&IF(AA20>0," E","")&IF(AB20>0%," F","")))

HTH
 

Watch MrExcel Video

Forum statistics

Threads
1,122,518
Messages
5,596,630
Members
414,082
Latest member
sasmita

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Top