This is a very interesting question. Are you trying to do this "live" and therefore time constrained, or at some leisure? In any case, the notebook would have to be "prepared" with previous material and you just want to be able to get at key portions quickly and conveniently.
One approach is to use CellTags and Hyperlinks. You can add CellTags (with the context menu) to cells. Then in your Text cell add a hyperlink to the CellTag in the current notebook. Then use Menu, Window, ShowToolbar to dock the toolbar at the top of your notebook. Then when you use the hyperlink to go to the CellTag the Go Back button on the toolbar will be activated. You can use this to return to the location of the hyperlink.
However, you asked for a better approach and I believe there is one. The hyperlink approach violates the maxim: "Don't jerk the reader around." If you jump back and forth you seldom see the existing material in conjunction with the new material. Rather than jumping to another part of a notebook, it is better to bring the material to the reader where he is using it.
In the Presentations Application I've provided some facilities that make it easy to do that. One of these is the WindowPresentation command. It just displays the output in a window. You can fairly easily implement it yourself, but WindowPresentation has all of the convenient options built-in. So, as an example, we might use the definitions:
Of course, we might actually use this for much more complicated output such as DynamicModules or formatted derivations.
A second method, that takes more effort to implement, is the use of Sidebars. A Sidebar is a notebook that is entirely embedded in the mother notebook and the contents hidden. A button can be created that will launch the notebook, in a separate window of course. We create a Sidebar with, say:
MakeSidebar["Quantum Gravity Derivation"]
That creates the notebook and you can type anything you want into the notebook, just like a regular notebook. Then you use:
I am using M9 to take notes from an online course, writing into a Text cell, but occasionally I want to be able to use a hyperlink at a place in the text to jump to some illustrative computation code in the same notebook. At the end of that code there should be another hyperlink to jump back to the original text position.
I can do this procedure manually (tediously) of course, but has anyone formulated some more automated procedure for this please?
It would be really efficient if a "button" can be clicked to input the label for the hyperlink that jumps to the computation code, while dividing the current text cell just below the cursor and inserting a new cell, in order to assign a tag to this new cell for returning from the computation code. Another "button" would create a new hyperlink after the code, in order to jump back to the text.
Or is there a better solution for effectively typing-up a textbook with hyperlinks for illustrative example detours?