Select and copy all cells of a particular style within a notebook.

Interactively...

Create a notebook with a variety of cell styles, then an input cell bracket to select all cells of that same type:

Copy the cells with , then paste into a new notebook with :

Programmatically...

Create a notebook with a variety of cell styles:

Use CopyToClipboard to copy all the input cells in the notebook:

Use Paste to paste the clipboard contents into a new notebook:

  • Paste will automatically create well-formatted notebook expressions or cell expressions when provided with valid raw expressions.