Excel Formula Equivalent in Access

aneese11

New Member
Joined
Feb 15, 2016
Messages
1
I have an Access table that I pull, but then bring into Excel to do a running total number of days due to the nuances of the data needs, but when I first began this process, this was manageable because we were dealing with a few thousand rows, however, when I refreshed the dataset from Access this morning, we are now at 231,421 rows, so my Excel-based calculation now makes this a very inefficient process, but I am not sure of the best way to (or if there is a way to) bring this particular equation into Access. I will try to set this up as best as I can, but the Excel equation is as follows:

THE FOLLOWING EQUATION RUNS IN THE "PRODUCTION DAY" COLUMN
=IFERROR(IF(AND([@[PROD_DT]]>=[@[FIRST_PROD]],[@[BOE/D]]>0,[@[COMP_NAME]]=A1),COUNTIF([@[BOE/D]],">0")+Q1,IF(AND([@[PROD_DT]]>=[@[FIRST_PROD]],[@[COMP_NAME]]<>A1),COUNTIF([@[BOE/D]],">0"),"")),1)

Desired end result is for this to return a running number of days a "COMP_NAME" has a positive value in BOE/D.

COMP_NAMEPROD_DTFIRST_PRODPRODUCTION DAYBOE/D
WELL_11/9/20121/15/2012
WELL_11/10/20121/15/2012
WELL_11/11/20121/15/2012
WELL_11/12/20121/15/2012
WELL_11/13/20121/15/2012
WELL_11/14/20121/15/2012
WELL_11/15/20121/15/2012124.22
WELL_11/16/20121/15/2012229.12
WELL_11/17/20121/15/2012338.52
WELL_11/18/20121/15/2012457.62
WELL_11/19/20121/15/2012542.59
WELL_11/20/20121/15/20126108.55
WELL_11/21/20121/15/2012766.03
WELL_11/22/20121/15/2012854.20
WELL_11/23/20121/15/20128
WELL_11/24/20121/15/20128
WELL_11/25/20121/15/201291.18
WELL_11/26/20121/15/201210201.95
WELL_11/27/20121/15/201211313.25
WELL_11/28/20121/15/201212175.63
WELL_11/29/20121/15/20121384.28
WELL_11/30/20121/15/201214168.18

<colgroup><col><col><col><col><col></colgroup><tbody>
</tbody>

Any insight or help would be greatly appreciated.

<colgroup><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col></colgroup><tbody>
</tbody>
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Hi,
I wouldn't want to tackle this without knowing what a BOE/D is, or whether BOE/D is a static or calculated value. In general, you don't do "running" totals in database tables or queries, only in reports.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,221,827
Messages
6,162,202
Members
451,752
Latest member
freddocp

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