1
$\begingroup$

I have a very simple notebook like this:

Quit[]
a = 10;
Sin[a]
k = 10;
Plot[Exp[x], {x, 0, 10}]
Plot[Sin[x], {x, 0, 10}]
k = 0.8;
Sin[k]
A = {1, 2, 4, 6, 9, 4};
ListPlot[A]

I want evaluate with "one click" the code from k = 10; to A = {1, 2, 4, 6, 9, 4};, ignoring the rest;

I try with Ctrl+A, then Ctrl+click to deselect unnecessary cells and then Enter but mathematica evaluate only one cell.

This is a very similar question, but it looks like it does not work for me.

$\endgroup$
  • $\begingroup$ How is your notebook structured? Is this all in one cell? Are these in separate cells? $\endgroup$ – b3m2a1 Oct 8 '17 at 18:55
  • 1
    $\begingroup$ Yes, are separate cells $\endgroup$ – Ugo Mela Oct 8 '17 at 19:02
  • $\begingroup$ Welcome to Mathematica.SE! I suggest the following: 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Take the tour! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! $\endgroup$ – Michael E2 Oct 8 '17 at 19:04
  • 1
    $\begingroup$ And what is the decision procedure for when you've hit the end cell? I think the easiest thing to do here is to just wrap things in a cell group, because then you can click on the group bracket and evaluate that. $\endgroup$ – b3m2a1 Oct 8 '17 at 19:04
2
$\begingroup$

I try with Ctrl+A, then Ctrl+click to deselect unnecessary cells and then Enter but mathematica evaluate only one cell.

You should use the Evaluation ▶ Evaluate Cells menu item:

http://reference.wolfram.com/language/ref/menuitem/EvaluateCells.html

Note that this can be easily found in the Docs:

http://reference.wolfram.com/search/?q=Evaluate+selected+Cells

$\endgroup$
  • $\begingroup$ I am having trouble with running a tagged cell in nb1 from nb2. I created various cells initialized and tagged in nb1, and I like to retrieve and run those tagged cells into nb2. Can you help me in doing this? $\endgroup$ – Tugrul Temel Dec 6 '19 at 22:55
  • $\begingroup$ @TugrulTemel Answered. $\endgroup$ – Alexey Popkov Dec 7 '19 at 5:12

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