making an Excel code work for Access

  • Thread starter Thread starter JenK
  • Start date Start date
J

JenK

I have an excel code that I would like to transfer into my access database. I
replaced the cell numbers with the field names (like so [FieldName]). But I
get a syntax error.
Anyone know where I can some help with this?

=IF(D7="SW",((IF(E7<25,C7*F7*G7/92903.4,((IF(AND(E7>24,E7<38),C7*F7*G7/92903.4*1.5,((IF(AND(E7>37,E7<50),C7*F7*G7/92903.4*2,((IF(AND(E7>49,E7<63),C7*F7*G7/92903.4*2.5,((IF(AND(E7>62,E7<75),C7*F7*G7/92903.4*3,""))))))))))))))),(IF(E7>0,(C7*F7*G7)/92903.4,IF(G7>0,G7/304.8*C7,C7))))
 
Based on the formula, I'm guessing you created a table in Access that looks
like a spreadsheet in Excel. As you're finding out, Access doesn't work too
well if you try to feed it 'sheet data.

If you'll provide more specific descriptions of what data you are keeping in
those "fields", folks here may be able to offer specific suggestions on how
to structure/organize your data in Access to make better use of Access'
features/functions.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
First, there are many differences in the functions between Excel and Access.
Pasting one to the other seldoms works. For example, the equivalent of the
IF function in Access is the IIf statement; however, it is seldom used
outside queries because it is difficult to construct and almost impossible to
read.

Where is it you are trying to use this code?
 
Back
Top