To add the values in B2:B5 in ses-mode I would write either
(+ B2 B3 B4 B5)
or
(apply '+ (ses-range B2 B5))
but how can I generate the values in the range C2:C5 from B2:B5?
From the to-do list at the start of the ses.el we find: "Allow paste of one cell to a range of cells -- copy formula to each." Indicating that this functionality has not been implemented yet.
I guess that would be, more or less, the functionality you are looking for. To me, it looks like the ses library, unfortunately, is not very useful yet, and that the development of the library has never been completed.
However, for the simple example above, I think Org mode tables provide a perfectly working alternative solution. Open a buffer named foo.org
and enter the following:
| Month | Value | Amount |
|-------+-------+--------|
| Jan | 23 | |
| Feb | 34 | |
| Mar | 45 | |
| Apr | 56 | |
#+TBLFM: $> = $>> / 10
Start Calc with M-x calc
and then press C-c C-c
on the #+TBLFM
line to fill out the third column. The formula applies to the whole column and is read as "fill out the last column from the corresponding entry of the penultimate column, divided by 10."
The nicer alternative probably would be to add the functionality to the ses library, but that does not look super easy to me (also not super hard).