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.
Examples
SelectedCells[]SelectedCells[EvaluationNotebook[]]Please visit the official Wolfram Language Reference for more details.