SelectedCells

SelectedCells[notebook]

returns a list of CellObject expressions corresponding to the currently selected cells in notebook.

SelectedCells[]

returns the currently selected cells in the notebook in which this function is being evaluated.

Details and Options

Examples

open allclose all

Basic Examples  (3)

Return a given selected cell:

Return an empty list if no cell is selected:

Return selected cells of a given notebook:

Options  (1)

AllowInlineCells  (1)

By default, SelectedCells returns selected inline cells, such as this one with the style "Output2":

AllowInlineCells->False causes the outermost CellObject to be returned instead:

Wolfram Research (2014), SelectedCells, Wolfram Language function, https://reference.wolfram.com/language/ref/SelectedCells.html.

Text

Wolfram Research (2014), SelectedCells, Wolfram Language function, https://reference.wolfram.com/language/ref/SelectedCells.html.

CMS

Wolfram Language. 2014. "SelectedCells." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/SelectedCells.html.

APA

Wolfram Language. (2014). SelectedCells. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/SelectedCells.html

BibTeX

@misc{reference.wolfram_2024_selectedcells, author="Wolfram Research", title="{SelectedCells}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/SelectedCells.html}", note=[Accessed: 17-December-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_selectedcells, organization={Wolfram Research}, title={SelectedCells}, year={2014}, url={https://reference.wolfram.com/language/ref/SelectedCells.html}, note=[Accessed: 17-December-2024 ]}