By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,453 Members | 961 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,453 IT Pros & Developers. It's quick & easy.

Transfer Excel If statement to Access expression

P: 2
I have the following formula in Excel and I am trying to transfer the same formula into an expression builder in Access 2007. Does anyone know what the expression should look like in Access?

=IF(LEFT(VATs!H2,3)="L7R",VATs!E2&VATs!F2,IF(VATs! B2="",TRIM(VATs!E2),IF(VATs!B2<>"",TRIM(VATs!B2)," Not Rent")))
Jul 1 '14 #1
Share this Question
Share on Google+
3 Replies

Expert Mod 10K+
P: 12,430
In Access, the IF function is IIF. The only other change you would have to make is to reference your column names instead of the Excel coordinates.
Jul 1 '14 #2

P: 2
I tried this to see if that if the first 3 letters of my data equal LR7 then I want it to combine the Deposit and Check field, if not bring over 0. And my results were all of the fields have 0 as the results.

CDNumber: IIf(Left([VATs]![Document Number],3)="LR7",[Deposit] & [Check],"0")
Jul 1 '14 #3

Expert Mod 10K+
P: 12,430
[VATs]! was part of your excel reference. Not sure why you're continuing to use the excel reference.
Jul 1 '14 #4

Post your reply

Sign in to post your reply or Sign up for a free account.