Access query formula

ariel20029

Board Regular
Joined
Jun 20, 2013
Messages
97
Hi,
I have a simple formula in an access query that is returning -1 instead of 10000000. Can you take a look at the formula and let me know what I am doing wrong. Its basically supposed to return 10000000 if greater than 25000 or less than -25000
RESEARCH: IIf([Change Unit Price]>=25000,10000000,0) Or (IIf([Change Unit Price]<=-25000,10000000,0))


thanks so much for your help.
Sharon
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Try this.

IIf([Change Unit Price]>=25000,10000000, IIf([Change Unit Price]<=-25000,10000000,0))
 
Upvote 0
Try this.

Not Renewed Yet: IIf(IsNull([Order Number]) Or [MaxOfEnd Date_PY]<=#6/30/2015#,10000,0)
 
Upvote 0
Try this.

Not Renewed Yet: IIf(IsNull([Order Number]) Or [MaxOfEnd Date_PY]<=#6/30/2015#,10000,0)


Sorry that did not work its continuing to return 10000 when order number is null. Any other suggestions. thanks for your help.
Sharon
 
Upvote 0
Typo, the Or between the expressions should, of course, be And.:eek:

Not Renewed Yet: IIf(IsNull([Order Number]) And [MaxOfEnd Date_PY]<=#6/30/2015#,10000,0)
 
Upvote 0

Forum statistics

Threads
1,214,915
Messages
6,122,214
Members
449,074
Latest member
cancansova

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
Back
Top