Solved

# Not understanding how a excel fromula caldulates

Posted on 2013-01-04
188 Views
I have a excel formula that I need to transfer to a access formula but i dont understand the formula what it means or how it is calculating.

equavalent vehicle complete is the  Name of the field that it is calculating and this is the formula

=SUMIF(\$D\$31:\$D\$395,"="&D4,\$AE\$31:\$AE\$395)

column d31- d395 are name of units like FY9 or fy10

column ae31-ae395 are percentages some are 100% SOME ARE 10 % and 5% AND SO ON
0
Question by:gigifarrow
[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
• 3
• 2
• 2
• +2

LVL 16

Assisted Solution

terencino earned 250 total points
ID: 38746038
The equivalent formula in Access is DSUM, have a look at this tutorial and let us know if you need any further help with that
MS Access: DSum Function

Essentially you must convert the Excel sheets and ranges to tables and fields, but otherwise the concept is exactly the same
...Terry
0

LVL 10

Assisted Solution

honestman31 earned 125 total points
ID: 38746042
source  http://office.microsoft.com/en-sg/excel-help/sumif-HP005209292.aspx

SUMIF   Adds the cells specified by a given criteria.
0

LVL 16

Accepted Solution

terencino earned 250 total points
ID: 38746056
So in Excel the SUMIF looks up in column D, picks out the cells that are the same as the criteria, eg FY10, then adds up the matching percentages on the same rows in Column AE.

Similarly say in Access you have a table called tblPercentages, it will have one field Year with data same as column D, and another field Percent with all the values from Column D. Then to get the same value as the SUMIF, your DSUM formula  would be:

=DSum("Percent", "tblPercentages", "Year = FY10")
0

Author Comment

ID: 38747021
Okay thanks experts but when i total them up it is not coming out correct. here is a example.The field is called Vehicle Equavalent I have it highlighted.

And the fields that are  supose to total i have them highlihted also.
exampleofvehicleequivalent.xlsx
0

LVL 50

Expert Comment

ID: 38747407
I don't see any formulas in that sheet - can you give a specific formula that you believe is mis-calculating?

If you are using the formula from your question, i.e.

=SUMIF(\$D\$31:\$D\$395,"="&D4,\$AE\$31:\$AE\$395)

then because D4 is blank that will sum all the AE column values where the corresponding cell in column D is blank

regards, barry
0

LVL 74

Assisted Solution

Jeffrey Coachman earned 125 total points
ID: 38751091
Yes, please post a sample sheet that actually works for the formula you posted.

Then post a sample of the Access data and the exact results you want...

As was stated by terencino, the equivalent in Access would be Dsum.
The basic syntax is:
=Dsum("YourField", "YourTable", "YourCriteria")

For example:
=Dsum("Salary","tblSalaries","EmployeeID=" & me.txtEmployeeID)
This will sum all the salaries if the EmployeeID matches what is in the EmployeeID textbox
(Presumes EmployeeID is a number)

If you are dealing with a string criteria (like FY10), then the syntax becomes "roughly" something like this:
=Dsum("Cost","tblCosts","Unit=" & "'" & me.txtUnit & "'")

JeffCoachman
0

Author Comment

ID: 38763105
Sorry about that. Been busy I had copied and pasted it and I didnt know that the formulas would not show up here is the formulas.

The field is called vehicle:equavalent vehicle complete
BUSK-III-FS3--STATUS-REPORTforhe.zip
0

LVL 74

Expert Comment

ID: 38763605
0

LVL 16

Expert Comment

ID: 38766148
Hi gigifarrow it looks like your SUMIF works fine, why do you think it is not working?
0

## Featured Post

Question has a verified solution.

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

Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retrâ€¦
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with â€¦
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as formâ€¦
###### Suggested Courses
Course of the Month6 days, 8 hours left to enroll