Monday, August 12, 2013

Merging Bookmarks

In this post we'll see how to create, use, and merge bookmark references in Myrtle spreadsheet.  You may notice that I am using Myrtle's Crumbach theme, so don't be worried if your spreadsheet looks different from mine.



Begin by dragging your mouse over (selecting) the first 10 rows in column A. Next, right click (or Ctrl+f) to bring up the "Fill Dialog."  By default, Myrtle's fill will start at 1.0 and increment by 1 up to the number of selected cells.
 

Go ahead and click "Ok".   Notice that Myrtle has filled the range A1:A10 with an ascending sequence starting at 1 and ending at 10. Next select the first 10 rows of column B and then bring up the "Fill Dialog" again. This time, just to be different, will fill with a descending sequence of numbers.  Enter "10" for the "Start" and enter "1" for the "Stop."




Next, let's bookmark the ranges we have just created so we can refer to them by hashtag reference in a cell formula later on.  Select the range A1:A10 and bring up the "Bookmark Dialog" (or use Ctrl+r).  Give this range a name like "ValuesA" (or whatever other name you choose).




We'll do the same for the values in B1:B10.  I'll call mine "ValuesB", but you can call yours whatever you'd prefer.  Once you have done that, open the bookmark manager.  Click on the book icon (or use Ctrl+Shift+r).  You should see something like the following.




Let's get to merging!  Select the bookmarks you want to merge with your mouse.  Then right click (command+click on Mac's)  to bring up the pop-up menu.  Select "Merge".



Give the new merged range a nice name like "MergedData" and click the "Ok" button.






You should now see in your bookmark manager something like the following.



Notice that the merged range is actually a comma-separated list of cell ranges. Comma-separated lists of cell ranges can be long and a pain to type into a cell formula.  Instead, let's use a hashtag reference to the merged bookmark.  For this simple example let's suppose we want the sum of all the values in the two ranges.  Using our bookmark merge, we simply use the formula 


=sum(#MergedData)




You might remember from one of your math classes that the sum of integers from 1 up to N is N*(N+1)/2  This is commonly called Gauss' Rule.   For our example N=10, and we do so twice, so we should be able to check the result by 2*(10*(10+1)/2)=10*11=110.  This is indeed what Myrtle reports.


You will find that many of the functions in Myrtle can operate on merged references. These include functions like:

abs, acos, asin, atan, ceil, cos, exp, expm1, floor, getExponent, max, mean, median, min, sum, rint, round

No comments:

Post a Comment