Code for a formula

sgaurav

Board Regular
Joined
May 16, 2003
Messages
107
I am trying to implement this formula in Access that was done in Excel. Can you provide me the code for this??

=((((D17-E17)*I16)+E17)-F17)/((D17-E17)*I16)
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Could you give more information on what you have in Access?

What is the formula meant to do?
 
Upvote 0
That can still be easily written.

If in a query, insert the field names instead of references. If you give me the fields I'll set it for you
 
Upvote 0
Can you provide more information on what you require.

Form the formula you have provided you are looking at 2 different Rows,
Access doesn't work quite the same,
it calculates all of the fields against it's corresponding row/record, if that makes sense.

It looks like you may need to have 2 queries to achieve what you need.

Here's an example for adding 2 fields in Access using the wizard:

In the field you would use:

NewValue: [Value1]+[Value2]

NewValue is the name you assign to a new field which is Value1 + Value2 (these are your field names)

The SQL for this would be:

SELECT [Value1]+[Value2] AS NewValue
FROM [YourTable];

What you need to expand on is the Value being held in the Row above in Excel as Access doesn't look at specific rows in it's calculation.

Hope that makes sense.

Regards,
 
Upvote 0

Forum statistics

Threads
1,221,838
Messages
6,162,286
Members
451,759
Latest member
damav78

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top