View Full Version : translate excel formula to access expression


SplashDesigns
07-31-2001, 12:57 PM
I am in the process of converting data from an excel spreadsheet into an Access database.
The formula I use in the excel spreadsheet looks like this:
=IF(B30>0,8-(B30*0.1),0)

I have made numerous attempts to recreate this in Access using the IIf expression to no avail. Can someone please give some guidance on writing this for my access database.

Thank you so much for any assistance you can offer.
Splash

Rich
07-31-2001, 01:16 PM
What does B30 represent?

raskew
07-31-2001, 03:25 PM
Assuming that =IF(B30>0,8-(B30*0.1),0) is a typo, and that you really intended =IIF(B30>0,8-(B30*0.1),0), there's nothing wrong with the formula, other than knowing what B30 represents.

You can test it out in the debug window thusly:

B30 = 6
? IIF(B30>0,8-(B30*0.1),0)
7.4

SplashDesigns
08-01-2001, 10:10 AM
B30 represented the cell in the excel spreadsheet. In my access database it would represent my field 1st Titration.

I did use your suggestions and it worked. I'm not sure what I was doing wrong previously. Thank you so much for your kind assistance.