How do you perform Math Functions?

S

stephen

I am trying to divide two cells in a database to find a
Rate per minute. I have column 8 with the cost of a
phonecall, and column 7 with a duration. I want to divide
the cost by the duration and display the Rate per minute,
so that I can then sort by that derived number. This is
easy in Excell, but the file I am working with is 200K
records long. Is there a way to do this in Access that
is... not painful??
 
R

Rick Brandt

stephen said:
I am trying to divide two cells in a database to find a
Rate per minute. I have column 8 with the cost of a
phonecall, and column 7 with a duration. I want to divide
the cost by the duration and display the Rate per minute,
so that I can then sort by that derived number. This is
easy in Excell, but the file I am working with is 200K
records long. Is there a way to do this in Access that
is... not painful??

Calculations are done in forms, reports, and queries, not in tables. Remember that
Access is not a spreadsheet so it will not work like one.

Create a query based on your table and add a new calculated field.

RatePerMinute: [PhoneCallCost]/[Duration]
 
J

John Vinson

I am trying to divide two cells in a database to find a
Rate per minute. I have column 8 with the cost of a
phonecall, and column 7 with a duration. I want to divide
the cost by the duration and display the Rate per minute,
so that I can then sort by that derived number. This is
easy in Excell, but the file I am working with is 200K
records long. Is there a way to do this in Access that
is... not painful??

A relational database IS NOT A BIG SPREADSHEET. It is *a different
kind of program*. It requires a different mindset and different
approaches!

You cannot, and should not try, to do this in a Table.

Instead, create a Query based on your table. Select whichever table
fields you want to see. In a vacant Field cell in the query design
grid type your expression: e.g.

Rate Per Minute: [Cost] / [Duration]

You can then set the Sort under this calculated field to Ascending,
and base a form or report on the query.
 

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