Wondering if there is a way to modify part of the web address (passed through in double quotes) in a =ImportHtml function in Google Spreadsheets?


www.schoolgrades.com/tom www.schoolgrades.com/jerry www.schoolgrades.com/daffy

I just want to be able to do this for a whole list of names without having to edit the ImportHtml function. I haven't been able to get it to work yet but am sure it can be done.


You could concatenate the URL from another cell. Let's say you have 3 columns, where each column header is a name:

Tom | Jerry | Daffy

... and that you want row 2 - X to be populated by the importHTML function. Then, in row 2 column A, you would write

=importHTML("http://www.schoolgrades.com/" & A1)

This will be interpreted as =importHTML("http://www.schoolgrades.com/Tom"). If you drag the formula across row 2, the formula will automatically be updated so that row 2, column B will be =importHTML("http://www.schoolgrades.com/" & B1) etc.

In case you wondered, the & is the string concatenation operator.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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