Showing posts with label google. Show all posts
Showing posts with label google. Show all posts

Friday, December 18, 2015

Creating a custom formula in Google Sheets to concatenate a range of values with a delimiter

In the past, I have written a little VBA to create an Excel function to do this.  I use it to take a range of cells containing email addresses and make one string containing those addresses delimited by semi-colons suitable for pasting into the TO: field of an email.

Now that I am using Google Sheets more, I was curious if I could do a similar thing.

With a little investigation, I was able to go to Tools | Script Editor and enter the following:

 function CCAT(range, delimiter) {  
  var returnString = '';  
  var rows = range.length;  
  for (r=0; r<rows;r++){  
   var cols = range[r].length;  
   for (c=0; c<cols; c++){  
    returnString += range[r][c]+delimiter;  
   }  
  }  
  return returnString;  
 }  

Once it is saved I can invoke it from my Sheet using something like:

 =CCAT(C2:C25,";")  

Notice that a range like C2:C25 is automatically converted by Sheets into a two dimensional array.

After successfully creating the function, I searched for a similar solution online and found that there are ways to do it that do not require a custom script - see
https://productforums.google.com/forum/?hl=en#!category-topic/docs/how-do-i/FQbzbVK4-i0 , however my script is illustrative if not elegant.

Thursday, May 21, 2009

A Mathematical Search Engine?

There has been a fair bit of buzz about Wolfram Alpha and even comparisons to Google, but I don't think I really started to get it until I saw Maria H. Andersen's Picasa Web Album via Teaching College Mathematics.

Now the wheels are turning. How is Math education going to change with tools like these available to students? CAS tells students answers, this tells students questions.

Friday, November 21, 2008

I laughed out loud!

From Doug Peterson's del.icio.us stream:


Let me google that for you
This is for all those people that find it more convenient to bother you with their question rather than google it for themselves.
(tags: weird web utilities useful tools share)


I visited the site, typed my favorite search term ("Ubersketch") and laughed out loud when I saw the result. Now, will I be brave enough to send that to a querier (that is someone who poses a query - which reminds me of an off-colour joke about the effeminate English teacher...)?

Geoff Day told me again that there is no such thing as a dumb question, but in my heart of hearts, I tend to disagree.

Friday, December 14, 2007

Web 2.0 Tools

I am spending the day with Will Richardson exploring some Web 2.0 tools.

Among the neatest things have been
  • Google Reader where RSS feeds can be aggregated including
    • other people's blogs
    • google blog search
    • people's del.icio.us tagged links
    • photos from flickr e.g. html://www.flickr.com/photos/tags/math
    • videos from youtube etc.
Tim Hawes shared a site with tutorials in plain English for these tools.

John Taylor found an interesting Adobe Connect Video