Is it posible to run script auto updating a field when one of the fields used to find it is its self being calculated with script?

Is it posible to run script auto updating a field when one of the fields used to find it is its self being calculated with script?

Hi
I know this may sound link a big ask but I would like to use this in a couple of places. I would like to calculate a total from rows in a sub form the problem is that the field in the sub form is pulled from the CRM rather than being user entered.

I also would link to us this total in a formula field (i.e that this fired and subtract another calculated value to get a figure for the profit.

Any thought would be greatly appreciated.
Cheers
Dan