making an Excel code work for Access

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))))
 
J

Jeff Boyce

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
 
K

Klatuu

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?
 

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

Similar Threads


Top