Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2011
    Posts
    2

    Unanswered: calculation in report

    I have a report that will have data in 2, 3, 4, 5, or 6 columns. I have it add the numbers using NZ, but I need the percentage which is the number of columns filled x10. For example: the first student might have in column 1, 6, in column 2, 4 and in column 3, 5...The result shows 15 and I would like the percentage to be 50 (15/30)
    the next student could have 5,3,5,7,10 which is 30 and the percentage would be 60% or 30/50. It seemed easy but I must be missing something.
    Thanks.

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    Id suggest you do this by placing some code behind the forms on format event
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    It should be something like:
    Code:
    For <Each column>
        If Isnull(Column(x)) = False Then 
            Total = Total + Column(x)
            ColumnCount = ColumnCount + 1
        End If
    Next
    Percentage = Total / ColumnCount * 10
    Have a nice day!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •