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.

I am looking to use the importHTML function for loading a page and I would like to sum a particular column in Google Spreadsheets.

But I am not having much success.

This is the URL:

=RIGHT(index(importhtml("http://sgx.i3investor.com/servlets/stk/annent/t82u.jsp","table",7),,4),6)
share|improve this question
1  
what URL you're thinking off? –  Jacob Jan Tuinstra Sep 19 '13 at 10:35
    
Are you getting a specific error back? What's not actually working for you? The full function you're using could be helpful; you might not be importing the right data. –  Andrew Lott Sep 19 '13 at 11:26
1  
Hi Guys, Thanks for getting back. I have attached the URL i am working with as well as the formula for google spreadsheet. –  lancegoh Sep 22 '13 at 5:48
add comment

1 Answer 1

up vote 0 down vote accepted

It is possible, by using the this formula.

Formula

=SUM(ARRAYFORMULA(IFERROR(VALUE(RIGHT(index(importhtml("http://sgx.i3investor.com/servlets/stk/annent/t82u.jsp","table",7),,4),6)))))

Explained

There are two things that need to be taken into account:

  1. text to number conversion
  2. error capturing

The first is done by the VALUE function, that returns a number. The clue as to the second point starts here. The header of the table, can't be converted into a number !! Here the IFERROR function will return nothing if an error arises. Now the ARRAYFORMULA and the SUM can finish it off.

Example

I've created an example file for you: Sum IMPORTHTML table

share|improve this answer
1  
Thanks for that! –  lancegoh Sep 22 '13 at 12:20
add comment

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.