Using a Menu Item or Keyboard Shortcut...

Choose Insert Input from Above () to copy the nearest preceding input:

  • Insert Input from Above () will only paste input from the current notebook.

Programmatically by Line Number...

Refer to the n^(th) input expression with In[n]:

  • In[] gives the most recent input from any notebook in the current session.
  • In[-n] gives the input n lines back.

Programmatically by Line Number...

Refer to the n^(th) input expression with In[n]:

  • In[] gives the most recent input from any notebook in the current session.
  • In[-n] gives the input n lines back.

Programmatically by Line Number...

Refer to the n^(th) input expression with In[n]:

  • In[] gives the most recent input from any notebook in the current session.
  • In[-n] gives the input n lines back.