Re: Access long expression - parenthsis problem



You would be much better off creating a custom function for this in
VBA rather than using an if statement. However, here's my shot at the
parentheses problem:

IIf(
(
Round(
(
nz([RuralMill06])*(
(nz([SumOfLand06]))+nz([NetBldgAssess06])
)+nz([ResiRuralMill06])*(
nz([NetResiBldgAssess06])+nz([SumOfResidentialLand06])
+nz([SumOfRuralLand06])
)
)*0.001,2
)<1 and
Round(
(
nz([RuralMill06])*(
(nz([SumOfLand06]))+nz([NetBldgAssess06])
)+nz([ResiRuralMill06])*(
nz([NetResiBldgAssess06])+nz([SumOfResidentialLand06])
+nz([SumOfRuralLand06])
)
)*0.001,2
)>0
),1,iif(
Round(
(
nz([RuralMill06])*(
(nz([SumOfLand06])
)+nz([NetBldgAssess06])
)+nz([ResiRuralMill06])*(
nz([NetResiBldgAssess06])+nz([SumOfResidentialLand06])
+nz([SumOfRuralLand06])
)*0.001,2
)=0,0,IIf(
Round(
(
nz([RuralMill06])*(
(nz([SumOfLand06])
)+nz([NetBldgAssess06])
)+nz([ResiRuralMill06])*(
nz([RoundResiBldgAssess06])+nz([SumOfResiLand06])
+nz([SumOfRuralLand06])
)*0.001,2
)>1,Round(
(
nz([RuralMill06])*(
(nz([SumOfLand06]))+nz([NetBldgAssess06])
)+nz([ResiRuralMill06])*(
nz([NetResiBldgAssess06])+nz([SumOfResiLand06])
+nz([SumOfRuralLand06])
)
)*0.001,2
),'error'
)
)
)

.



Relevant Pages

  • Re: Access long expression - parenthsis problem
    ... "JasonF" wrote: ... VBA rather than using an if statement. ... here's my shot at the ...
    (microsoft.public.data.ado)
  • Re: Access long expression - parenthsis problem
    ... "JasonF" wrote: ... VBA rather than using an if statement. ... here's my shot at the ...
    (microsoft.public.data.ado)
  • Re: Left Lookup Custom function
    ... Function LeftSearch(textStr As String) As String ... Dim SpacePos As Long ... Hello all I am trying to write a custom function to do the work of my ... This is what I am trying to use in VBA ...
    (microsoft.public.excel)
  • custom function-code for percentage
    ... I am new to VBA. ... Public Function PLF(UnitsGenerated, PlantCapacity) ... The result of this custom function is shown in two digits. ...
    (microsoft.public.excel.misc)
  • Re: VBA Custom function for lookup
    ... I'm fairly new to VBA but I have managed to find ... >I am trying to create a custom function in VB to replace a 7 level ... That link didn't result in a dowloadable file. ... Rgds ...
    (microsoft.public.excel.worksheet.functions)