Take the 2-minute tour ×
Web Applications Stack Exchange is a question and answer site for power users of web applications. It's 100% free, no registration required.

Is it possible to convert text from a certain cell to RFC 3986 (http://url-encoder.org/) in a Google Spreadsheet?
Lets say C4 has the value John Doe, then D4 must be John%20Doe.

share|improve this question

1 Answer 1

up vote 4 down vote accepted

Yes, you can create a custom function for that.

Click Tools → Script Editor. Select Create blank project.

In the script editor window, paste the following code:

function encode(value) {
  return encodeURIComponent(value);
}

Save the script (give it a name if prompted), and return to your spreadsheet.

Now, you may use the function as =encode. If your C4 cell contains the text John Doe, enter the following in your D4 cell: =encode(C4).

D4 should now display John%20Doe.

I have created an example spreadsheet to demonstrate.

share|improve this answer
    
Awesome! This is it! Thank you so much!!! –  linda Sep 3 at 20:58

Your Answer

 
discard

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.