IF AND OR IN QUERY; ANY IDEAS?

uriah

New Member
Joined
Jun 24, 2002
Messages
40
Expr3: IIf(([CALC2]="SUN") Or (IIF [CALC2]= "SAT"),"y","n")

Can not get it to work. Access help is not to helpful with this.
Any ideas would be great. The help shows a debug routine in
VB, but, this is just an expression in a query field.?!

thx
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Try removing the second IIF.

Like this...
Expr3: IIf(([CALC2]="SUN") Or ( [CALC2]= "SAT"),"y","n")

Does that help?
 
Upvote 0
Thx.. I will give it a shot. I just copied and pasted that, and got
a request for a calc2 amount value, like it was prompting.. I must
have done something wrong.

I orig convert a date field to cal2 and format it ddd for day as an evaluation.
then I have calc3 look at cal2 and if it is a weekend, y, else no.

Thx ..

I will try again
 
Upvote 0
date issues

I copied the formula correctly, and got an error. So it was my fault.
I then tried the same 'if' on a non data field, and it worked. I have had a lot
of issues with date(s) over the years. I do not think I can convert it
to text, I tried that. Oh well. I am going to start the weekend
early and look at it Monday...Cheers

Thank you kindly Homer
 
Upvote 0
uriah

I don't know if it's of any use but there is a Weekday function that will return the day of the week,
 
Upvote 0

Forum statistics

Threads
1,223,275
Messages
6,171,119
Members
452,381
Latest member
Nova88

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