Excel Formula in Access?

S

Sangre

I am converting an excel spreadsheet to Access. There is a
formula in excel: =IF(B8="","", IF(E8>0,0,IF(D8=0,1,IF
(D8=1,0.5,0)))) ...that I don't know how to approach in an
access query. I tried IIf but that did not work. Any
thoughts? Also, since this Access the Cells are now field
names.
 
R

Rick Brandt

Sangre said:
I am converting an excel spreadsheet to Access. There is a
formula in excel: =IF(B8="","", IF(E8>0,0,IF(D8=0,1,IF
(D8=1,0.5,0)))) ...that I don't know how to approach in an
access query. I tried IIf but that did not work. Any
thoughts? Also, since this Access the Cells are now field
names.

Check Help file for Switch() function.
 
M

M Skabialka

Try something like this
Expr1:
IIf([MyTable].[B8]="","",IIf([MyTable].[E8]>0,0,IIf([MyTable].[D8]=0,1,IIf([
MyTable].[D8]=1,0.5,0))))

Replace the cell names with field names of course, and your table name.

Mich
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top