Announcement

Collapse
No announcement yet.

Get the Sum of a column in a grid

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Get the Sum of a column in a grid

    Hi

    I tried to get the sum of all numbers in a column , its works the first time, but when click the second time it give an error

    Code:
    function Done_Sum()
    
    Notes_Row = 1
    
    Notes_Path = "AutoPlay\\Docs\\"..Unit.."\\"..Unit..EP.."\\"..Un it..EP.." Notes.csv"
    Grid.LoadFromFile("Notes Grid", Notes_Path, ",", true);
    
    Done_Sum = String.ToNumber(Grid.GetCellText("Notes Grid", Notes_Row, 11));
    
    for Notes_Row = 2, 32 do
    
    
    Done_Sum = Done_Sum + String.ToNumber(Grid.GetCellText("Notes Grid", Notes_Row, 11));
    
    end
    
    end
    Click image for larger version

Name:	Screenshot 2021-09-14 130448.jpg
Views:	127
Size:	43.9 KB
ID:	307561
    Thanks

  • #2
    Hi sameer,
    Quick look it appears you are using your function name and also using that name in a variable
    try
    function DoneSum()
    Cheers

    Comment


    • #3
      Thanks Colc
      I will take this note in consideration for the future, i was not aware of this.

      Comment

      Working...
      X