Results 1 to 2 of 2
  1. #1
    AlfSam is offline Novice
    Windows 11 Office 365
    Join Date
    Mar 2023
    Location
    Qld, Aust
    Posts
    1

    Expression calculating values of cells not blank

    ((I want to calculate an entry fee [Column1 (text)] * constant (e.g. $25) only if Column1 is not blank) then add value [+] to next calculation [Column2 (text)]* constant [+] [Column3] * constant ) show sum total $ for up to 4 entries.
    calculation would be $0 when cell blank (i.e. no entry).
    Can someone suggest how the expression would be written in the expression builder?

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    In a blank column of a query, perhaps something like:
    ColTots:CCur((Nz([Column1],0)*[Constant])+(Nz([Column2],0)*[Constant])+(Nz([Column3],0)*[Constant]))

    I am assuming that Constant is the name of a column (field). Column1, Column2 and Column3 would need to be replaced with your real field names.
    The names used, suggest that the database has not been normalised correctly.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

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

Similar Threads

  1. Replies: 6
    Last Post: 02-17-2022, 12:32 PM
  2. Replies: 6
    Last Post: 09-14-2018, 01:47 PM
  3. Replies: 5
    Last Post: 12-03-2014, 11:34 AM
  4. Replies: 2
    Last Post: 08-22-2014, 02:38 PM
  5. Blank cells are Importing
    By Sumanth.Ganjam in forum Access
    Replies: 3
    Last Post: 01-08-2014, 08:04 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