Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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
1  
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" –  Pickett May 31 '13 at 18:07
1  
Set the cells initialization or cell tags. –  HyperGroups Jun 1 '13 at 1:25
1  
I regularly do Ctrl+A and then Ctrl+click to deselect different cells. –  Liam William 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
add comment

1 Answer

up vote 4 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},
    Function[cell,
      SelectionMove[cell, All, Cell];
      SelectionEvaluateCreateCell@nb
      ]~Scan~
     Intersection[
      Reverse@TakeWhile[Reverse@Cells[nb], # =!= prevCell &], 
      Cells[nb, CellStyle -> "Input"]]]
   ]
  ]
share|improve this answer
add comment

Your Answer

 
discard

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.