Adding formulas???is this possible???

G

Guest

I need to modify a table and since my understanding of access is very basic
I’ll try to be as simple as possible on my question:

I have trhee columns like

C1 C2 C3
USD A X
SGD A X
GBP A X

So I’ll need to “add aformula†where X=(A*#VALUE) ONLY IF C1=USD OR =
(A*#VALUE) ONLY IF C1=SGD OR =(A*#VALUE) ONLY IF C1=GBP.

I know how to do this with Excel, but I don’t even know if this can be done
with access. Maybe running a query? I’d do the table again and paste it from
excel but it has more tan 600,000 records and it’ll be a pain.

Please help!
 
G

Guest

I expect this can be done in Access but why don't you use numbers as sample
data rather than letters? "A" can't be multiplied by #VALUE especially when
we don't know where #VALUE is coming from.

Please try again with some numbers and the desired results of your formula.
 
G

Guest

approach it like excel. In the query grid use the build tool and lookup the
functions that are excel like. You have to decide how you want to calc this,
what triggers the calculation, an input or a statement that you initiate.
 
J

Jamie Collins

I have trhee columns like

C1 C2 C3
USD A X
SGD A X
GBP A X

So I'll need to "add aformula" where X=(A*#VALUE) ONLY IF C1=USD OR =
(A*#VALUE) ONLY IF C1=SGD OR =(A*#VALUE) ONLY IF C1=GBP.

I know how to do this with Excel, but I don't even know if this can be done
with access. Maybe running a query?

Query. What about other cases? return NULL? Something like:

SELECT thing_ID,
IIF(C1 IN ('USD', 'SGD', 'GBP'), C2 * thing_amount, NULL) AS
thing_result
FROM Things;

Jamie.

--
 

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