Hello,
I am trying to add a column of table cells together, which I know how to do, but for two of them, I need to multiply them by a value first, and then add all the cells in the column together. I can't seem to get the syntax right. Here is what I have:
sum(Cell2a*0.51) + (Cell3a*0.555) + (Cell4a + Cell5a + Cell6a + Cell7a + Cell8a)
Can anyone help me get this straight, so there are no more errors?
Regards,
ZeroZone
Views
Replies
Total Likes
Hi,
The FormCalc sum function is comma separated:
sum((Cell2a*0.51), (Cell3a*0.555), Cell4a, Cell5a, Cell6a, Cell7a, Cell8a)
Hope that helps,
Niall
Views
Replies
Total Likes
Unfortunately I might have something else wrong. I now have this error:
Regards,
ZeroZone
Views
Replies
Total Likes
Hi,
It appears that while the object with the script can see most of the cells, it either:
Check the reference to Cel8a. It may be in a different row or subform. Have a look here for a disucssion on object references: http://assure.ly/kUP02y.
Hope that helps,
Niall
oh no, I just realized I was trying to go the wrong way in the table. I need to do this by column, not row, so this is what I have now (and it's still giving me an error).
sum(Table2.Row[*].Cell2[*]), (Cell2a*0.51), (Cell2b*0.555)
where I need Cell 2a to multiply by 0.51 and Cell 2b to multiply by 0.555 and then be added to the rest of the cells in that column (Column 2).
ZeroZone
Views
Replies
Total Likes
Hi,
A couple of things:
sum(Table2.Row[*].Cell2), (Cell2a*0.51), (Cell2b*0.555))
Niall
Hi Niall,
I was still getting an error message, and then just decided to try and remove the closing bracket after Cell2 and it worked! Yay! Thank you!
Regards,
ZeroZone
Message was edited by: zerozone110
Views
Replies
Total Likes
Correct Answer:
sum(Table2.Row[*].Cell2, (Row[1].Cell2a*0.51), (Row[2].Cell2b*0.555))
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies