[proFit-list] running sum?

Dave Sopchak dsopchak at enervault.com
Thu Oct 13 11:10:17 CDT 2011


So it does! Thanks, José! If you're ever near San Francisco, drinks are on me.

Dave

On Oct 13, 2011, at 8:40 AM, Arthur Rowe <arthur.rowe at nottingham.ac.uk> wrote:

> Dave - Jose's method works fine - although doing a 'copy and paste' from the email is not a good idea - hidden characters get imported. Just go to 'New Function' and re-type before hitting 'to Menu'.
> 
> Arthur
> 
> *******************************************************************************
> Arthur J Rowe
> Professor of Biomolecular Technology / Director NCMH Business Centre
> School of Biosciences
> University of Nottingham
> Sutton Bonington
> Leics LE12 5RD
> 
> TEL:  0115 9516156
> *******************************************************************************
> 
> On Oct 13, 2011, at 14:19, Dave wrote:
> 
>> Hi Jose,
>>       Thanks! I'll give it a try. I haven't done much with writing programs in pro Fit, maybe I should expand my repertoire!
>> 
>> Dave
>> On Oct 13, 2011, at 12:10 AM, Jose Ignacio Espeso wrote:
>> 
>>> What about using a simple program? It could be as easy as this one:
>>> 
>>> program RunningSum;
>>>    var
>>>       i,col1,col2:integer;
>>>       sum:extended;
>>> begin
>>>    Input('Input Column',col1,'Output Column',col2);
>>>    sum:=0;
>>>       for i:=1 to nrRows do
>>>          if DataOK(i,col1) then
>>>          begin
>>>             sum:=sum+data[i,col1];
>>>             data[i,col2]:=sum;
>>>          end;
>>> end;
>>> 
>>> 
>>>             /~~~~~~~~~~~~~~~~~~~~~~~~~~\
>>>             |   Jose I. ESPESO                            |      A/~~~\A
>>>             |   Dpto. CITIMAC                              |       ((o   o))___    
>>>             |   Universidad de Cantabria           |          \     /        ~~~
>>>  #         |   39005 Santander                         |     #   (---)\         #  
>>> -#--x---|   SPAIN                                             |----#-x---x---x---#---
>>>  #          \_________________________/     #              \     #   
>>> -#--x------| |--#---x---x---x-| |--x-------x---x---x---#-x---x---x---#---
>>>  #(//  \\)    | | )#(//  \\)(//  \\)   | |  (// \\)(// \\)(/ \)(/ \)  #  (// \\)(// \\)  #
>>> 
>>> 
>>> El 11/10/2011, a las 22:42, Dave Sopchak escribió:
>>> 
>>>> Hi all,
>>>> 
>>>> Is there a way to do a "running sum" of a column in pro fit? I mean, display the total of all values in a column thus far in the column next to it?
>>>> 
>>>> Nothing jumped out at me immediately. I know this is kind of a spreadsheet thing to do, but it would help if I could do this all in pro fit.
>>>> 
>>>> Thanks for any and all…
>>>> 
>>>> Dave
>>>> 
>>>> 
>>>> _______________________________________________
>>>> 
>>>> proFit-list mailing list
>>>> proFit-list at quantum-soft.com
>>>> http://quantum-soft.com/mailman/listinfo/profit-list_quantum-soft.com
>>> 
>>> _______________________________________________
>>> proFit-list mailing list
>>> proFit-list at quantum-soft.com
>>> http://quantum-soft.com/mailman/listinfo/profit-list_quantum-soft.com
>> _______________________________________________
>> proFit-list mailing list
>> proFit-list at quantum-soft.com
>> http://quantum-soft.com/mailman/listinfo/profit-list_quantum-soft.com
>> 
> 
> _______________________________________________
> proFit-list mailing list
> proFit-list at quantum-soft.com
> http://quantum-soft.com/mailman/listinfo/profit-list_quantum-soft.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://quantum-soft.com/pipermail/profit-list_quantum-soft.com/attachments/20111013/46c8bd42/attachment-0001.html>


More information about the proFit-list mailing list