Results 1 to 3 of 3
  1. #1
    AussieGal is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    56

    Sum IF else minus

    Hi,



    I have a report which is a statement. I want to be able to have a field that calculates rent, and minus payments. There are a few rent types, Pro Rated rent, Rent brought forward and rent changed, then there is 1 payment type. I am trying to write the sum a few ways, but have not had success. If rent type i= 1 or 2 or 3 I want it to add, if rent total = 4 I want it to minus.

    =Sum(IIf([RentType]=1 Or 2 Or 3,[RentAmount],0))-Sum(IIf([RentType]=4,[RentAmount]))

    Any ideas?

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    50,360
    Try:

    =Sum(IIf([RentType]=4,-1,1)*[RentAmount])
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    AussieGal is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    56
    This worked perfectly, Thank you

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

Similar Threads

  1. Plus minus drop down menu
    By ashu.doc in forum Forms
    Replies: 3
    Last Post: 08-09-2012, 10:04 PM
  2. Workaround for MINUS (with Where)
    By Autoclave in forum Queries
    Replies: 2
    Last Post: 10-31-2011, 08:15 AM
  3. Date Add 26 weeks minus 1 day
    By ker9 in forum Queries
    Replies: 3
    Last Post: 07-26-2011, 01:20 PM
  4. minus particular Items (barcode) only...
    By alex_raju in forum Access
    Replies: 1
    Last Post: 06-28-2011, 11:11 AM
  5. Time minus one for hour.
    By brianb in forum Queries
    Replies: 2
    Last Post: 03-09-2011, 11:02 AM

Tags for this Thread

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