Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"A field is required here"

Status
Not open for further replies.

KL_Hutchmfg

IS-IT--Management
May 2, 2018
18
US
I am trying to create a formula to calculate efficiency. I need to divide production hours by the sum of 3 different hour totals *100 to get a percentage. Here is the formula I am using. TIA

Dim nReturn As Number
If {#ProdHoursByWC} <> 0 Then
nReturn = ({#ProdHoursByWC} / Sum ({#SetupHoursByWC} + {#DirectMachHoursByWC} + {#ReworkHoursByWC}) * 100)
If nReturn > 999 Then
nReturn = 999
ElseIf nReturn < -999 Then
nReturn = -999
End If
Else
nReturn = 0
End If
formula = nReturn
 
Try removing the word "sum" and leave the parens as is. The running totals are already summaries that you are adding together. This will only work properly in the footer section of course.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top