2

I can count how many cells there are in a notebook up to and including the one whose ID i need, and then evaluate Cells[EvaluationNotebook[]][[number, 1]].

How to do this simpler? And how to get a list of cell IDs when a number of cells are selected?

MeMyselfI
  • 1,116
  • 5
  • 12
  • CurrentValue[#, CellID] & /@ SelectedCells[InputNotebook[]] is this what you want? – Kuba Feb 19 '18 at 12:32
  • @Kuba Thank you Dynamic[SelectedCells[EvaluationNotebook[]][[All, 1]], UpdateInterval -> 1] works. I get ID number 4929, but confusingly CurrentValue[CellObject[4929], "CellID"] evaluates to 0. – MeMyselfI Feb 19 '18 at 12:46
  • 2
    CellID option and CellObject's id are not the same thing. It would be good to know what do you want at the end. – Kuba Feb 19 '18 at 12:59

0 Answers0