Convert Excel Formula to MS Access Query Syntax

dk_hanal

New Member
Joined
May 5, 2017
Messages
8
I need to convert this excel formula to access query syntax: =VALUE(YEAR(E2) + IF(F2<DATE(1990,1,1), 60, 62)) - while E2 and F2 being Access Field names. Any help is much appreciated. :)

Thank you.

dk_hanal
 
Here's the Excel formula that I would like to convert into Access Query Syntax. Anyone?
=value(year(e2) + if(f2< date(1990,1,1), 60,62))
 
Upvote 0

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Try this:
Code:
MyCalc: year([e2]) + iif([f2] < DateSerial(1990,1,1),60,62)
<dateserial(1990,1,1),60,62)[ code]<="" html=""></dateserial(1990,1,1),60,62)[>
 
Last edited:
Upvote 0
Perhaps something like this,

Year([Field1]) + Iif([Field2]< DateSerial(1990,1,1), 60,62)

where Field1 and Field2 represent E2 and F2 respectively.
 
Upvote 0
Just to point out if you want the less than symbol to appear without the spaces you can use & lt; (without the space) in place of < to display correctly.

It is only as far as I know the < symbol followed by a letter that causes the issue.

Just another option.
 
Upvote 0
or from now on just post the formula in pastebin.com and then post a link

The trouble with links is they can/do get removed at later dates which doesn't help anyone looking at the thread in future when searching for help.
 
Upvote 0
It is also possible to post your formula using the php code tags.
PHP:
=(A1>0 and A1<1)
 
Upvote 0

Forum statistics

Threads
1,225,616
Messages
6,186,016
Members
453,334
Latest member
Prakash Jha

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