How would I write the formula in adobe?
Message was edited by: Malcolm Thomson
So basically you want to ignore empty fields, right? I posted code that does that on these forums. Search for "calcAverage" and you should be able to find it.
I'm brand new to Adobe, so unsure of where to put the script and make it work. I went into custom script and edit and pasted the script you had written. also brand new at calculations, so sorry if I sound stupid.
when you say fields in your script, does that mean I put my fields everywhere it says fields? below are the fields I am looking at
Yes, this code should be used as the custom calculation script of the field where you want to show the result.
You need to enter the names of the fields, between quotes, into the fields array, yes.
Give it a try and post here how it goes... If it's not working correctly press Ctrl+J and check if there are any error messages in the window that opens.
this is what I have put in, but it gives me an error for line 2
Then as the custom calculation script of your field call it, like this:
calcAverage(["1W1", "1W2", ...], true, true);
works awesome. thanks.
now can I add a different formula for different cells? this is the formula in excel
how would I make that happen in adobe?
Its the average W1, W2, depth fields that would be used instead of the I22, I 23 and I24
Some useful resources:
You should not be adding the scripts there. Follow my instructions carefully, please. I never said anything about Document Actions.
Also, this script can be located just under the field. You don't need to put it at the doc-level (the other one also doesn't have to be there, but it's better in case you want to use it in multiple locations).