Solved

Calculate APY in Access

Posted on 2004-08-31
2
348 Views
Last Modified: 2009-12-16
Hello, I have an access table that has these two fiedls - TERM and RATE. To calculate the APY, currently I have to export this table to excel and run this formula:
=((1+RATE/100)^(TRUNC(TERM/12))*(1+(RATE/100*(TERM-TRUNC(TERM/12)*12))^(12/TERM)-1. Then, I have to import the excel file back into access and perform the rest of the queries.
Is there a way to perform this calculation in access? Thank you
0
Comment
Question by:lnchopo
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 4

Expert Comment

by:naivad
ID: 11943107
I think your problem is with the TRUNC function.

Try changing it to INT, (look up help on INT and FIX to see which function is better for you. Both drop the decimals, but handle negative numbers differently.)

=((1+RATE/100)^(INT(TERM/12))*(1+(RATE/100*(TERM-INT(TERM/12)*12))^(12/TERM)-1)
0
 
LVL 41

Accepted Solution

by:
shanesuebsahakarn earned 250 total points
ID: 11943113
You can use this expression in a query:

((1+[RATE]/100)^(Fix([TERM]/12))*([RATE]/100*([TERM]-Fix([TERM]/12)*12))^(12/[TERM])-1

In other words, you can write a query like this:
SELECT *, ((1+[RATE]/100)^(Fix([TERM]/12))*([RATE]/100*([TERM]-Fix([TERM]/12)*12))^(12/[TERM])-1 As APY FROM MyTable

This will return all of the fields in your table, plus a calculated field called APY with the results of your calculation.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question