Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

There is option to evaluate the complete notebook but I wanted to know if its possible to evaluate notebook from some desired cell to end or some other desired cell following?

share|improve this question
You could always left click the cell where you want to start, scroll down to the bottom and press shift while left clicking the last cell and then right click on any of the selected cells and choose "evaluate cells" – C. E. May 31 '13 at 18:07
Set the cells initialization or cell tags. – HyperGroups Jun 1 '13 at 1:25
I regularly do Ctrl+A and then Ctrl+click to deselect different cells. – Liam Jun 1 '13 at 7:18
I have a feeling there is a similar question on this site long time ago, but I can't find it.. – Silvia Jun 2 '13 at 7:25
up vote 6 down vote accepted

Does this work as you wish?

CreatePalette@Button["Evaluate down", 
  With[{nb = InputNotebook[]},
   SelectionMove[nb, Previous, Cell];
   With[{prevCell = SelectedCells[nb] /. {c_} :> c},
      SelectionMove[cell, All, Cell];
      Reverse@TakeWhile[Reverse@Cells[nb], # =!= prevCell &], 
      Cells[nb, CellStyle -> "Input"]]]
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.