By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,265 Members | 1,710 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,265 IT Pros & Developers. It's quick & easy.

How to convert excel formula to ms access

P: 3
Hi there, need help in converting the excel fomulas to ms access.
=IF(C2<=0,IF(SUM(B$2:B3)<F$2,0,SUM(B:B)-F$2),"")
below is the data from query1 and query2

QUERY1
COLUMN ACOLUMN B COLUMN C
DATEPurchasedAvailable
cell2 September 30, 201050 0
cell3 December 31, 2010100 172*
cell4 January 01, 201110
cell5 January 02, 201150
cell6 January 03, 201150
cell7 January 04, 201112

QUERY2
DATE Consumed
23-Sep 100



Once the data was been updated in query2, Available will update and returns 0 if was been diispense

or theresany other way to compute this using SQL or code builder?...

please advise.. many thanks!
Sep 25 '10 #1
Share this Question
Share on Google+
2 Replies


100+
P: 332
There is the Inline If (IIF) that works similar to IF in Excel, IIF(Condition,True,False)
Sep 27 '10 #2

100+
P: 255
The QUERY you called should be TABLE instead, QUERY is the one that stores the SQL codes.

The excel formula you provide may not be possible to implement in SQL query, because SQL cannot specifically look for 2 rows from the table --> SUM(B2:B3). Either look for 1 specific record or a whole heaps of records from the table.
Sep 28 '10 #3

Post your reply

Sign in to post your reply or Sign up for a free account.