Excel Formula in Access?

  • Thread starter Thread starter Sangre
  • Start date Start date
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.
 
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.
 
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
 
Back
Top