Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When you have long notebook with hundreds of cells, you sometimes need to scroll/jump manually to your last edited cell. I dind't find any shortcut for doing that. Any ideas?

share|improve this question
I don't think there is any. But maybe you can construct one by scanning the CellChangeTimes of all the cells and picking out the latest one. – Silvia Mar 28 '14 at 14:11

I don't think there is any shortcut for that. But we can always construct one by scanning the CellChangeTimes of all the cells and picking out the latest one.

Here is a quick solution:

       "Find me\nthe last edit!",
        {#, CurrentValue[#, CellChangeTimes]} & /@ 
           Cells[SelectedNotebook[], CellStyle -> {"Input"}] //
          DeleteCases[#, {CellObject[_], {}}] & //
         # /. {co_CellObject, timestamp_List} :> {co, Flatten[timestamp][[-1]]} & //
        SortBy[#, Last][[-1, 1]] & //
       SelectionMove[#, All, Cell] &

Select the generated button, and from the menu bar, select Palettes -> Generate Palette from Selection:

generate the palette

It should find the last edited "Input"-style cell in the current selected notebook.

Note: In order to use this solution, the notebook history tracking option should be enabled:

enable the notebook history tracking

share|improve this answer
It doesn't work for me. I get an Part::partw: "Part -1 of {} does not exist" error message. This may be due to the fact that CellChangeTimes sometimes contains a list with a list of values and sometimes a list with a single value. – Sjoerd C. de Vries Mar 28 '14 at 15:04
@SjoerdC.deVries I noticed that, too. But I've Flattened the list before doing the Part :( I'm investigating. – Silvia Mar 28 '14 at 15:07
@SjoerdC.deVries It seems some Cells doesn't include a CellChangeTimes option or thay're empty as Kuba said. Will fix it soon. – Silvia Mar 28 '14 at 15:11
@SjoerdC.deVries Kuba Have fixed the code. Cells without CellChangeTimes have been abandoned before Sorting. – Silvia Mar 28 '14 at 15:34
@Silvia Since you are around, please take a look, maybe you have something new to say: – Kuba Mar 28 '14 at 16:11

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.