Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X
Hi,
I have the error 'This operation can only be performed on an array' as on the sheet attached (simplified version of calc sheet). What is the work around?
The last part with the error would be part of a larger function, but acts in the same way.
Kind regards,
Dan
You can't use range variables i, j inside a program.
In a program you would have to use for-loops instead.
See if the calculation I appended at the end does what you intended.
I attached a version how I would do it and another one following the way you had chosen.
I also streamlined your row sum function as it was a bit unclear because of the double usage of the variable "j" and the inefficient and unnecessary inner loop. This function also does not require vectorization.
Prime 9 file attached