Results 1 to 3 of 3
  1. #1
    Hammer is offline Novice
    Windows XP Access 2007
    Join Date
    Jan 2011
    Posts
    4

    Unhappy Expression Help


    I have the following sum in an excel spreadsheet which I want to replicate in access, can any one help.

    the Excel sum is =if(b38=0,0,min(1,b38/(b34*24))) this basically works out a precentage of vehicle fill I.E b38 = Pallets despatched (17) and b34 is the max number of pallets I can get on a vehicle (24) therefore 17/24 = 71%.

    I have the same info in access and have tried to enter the expression as

    =if([sum of sum of pals out]=0,0,min(1,[sum of sum of pals out]/[sum of sum of No loads]*24))

    I keep getting an error message of "The expression you entered is missing a closing Parenthesis, bracket (]) or vertical bar (I). I have tried moving the brackets around etc but I can't get it to work

  2. #2
    weekend00 is offline I may not be right
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    1,295
    In Access, you should use IIF instead of IF; and there is no MIN function in Access.

    =iif([sum of sum of No loads]=0,0,Iif([sum of sum of pals out]/[sum of sum of No loads]*24 <1,1,[sum of sum of pals out]/[sum of sum of No loads]*24))

  3. #3
    ConneXionLost's Avatar
    ConneXionLost is offline Simulacrum
    Windows XP Access 2003
    Join Date
    Jan 2010
    Location
    Victoria, Canada
    Posts
    291
    Ignore this; duplicate post.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Looking for help with an expression
    By CoachBarker in forum Queries
    Replies: 3
    Last Post: 11-25-2010, 05:17 AM
  2. Expression value
    By KWarzala in forum Reports
    Replies: 0
    Last Post: 06-15-2010, 12:35 PM
  3. Expression trouble
    By ROB in forum Access
    Replies: 2
    Last Post: 06-08-2010, 09:36 AM
  4. simple expression!
    By Lon in forum Access
    Replies: 1
    Last Post: 05-13-2010, 10:45 AM
  5. Help With an expression
    By kylem4711 in forum Queries
    Replies: 2
    Last Post: 04-23-2009, 01:57 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums