Google-sheets – Google Sheets LEFT function trim text generated by IMPORTHTML function

google sheetsimporthtmlworksheet-function

When I use this formula to import data

=iferror(INDEX(IMPORTHTML("http://www.thestreet.com/quote/GE/details/company-profile.html","table",3),8,1))

The result is Sector: Industrial Goods. I'd like to use the LEFT function to remove the Sector: text and show only Industrial Goods. I can't seem to get the syntax right. I can use this formula to show the length of the string:

=len(iferror(INDEX(IMPORTHTML("http://www.thestreet.com/quote/GE/details/company-profile.html","table",3),8,1)))

But can't figure out how to incorporate the LEFT function to get my result.

Best Answer

Short Answer

Instead of LEFT() use RIGHT().

Explanation

The LEFT() function returns the leftmost characters, but the OP want to get the rightmost characters.

The following is a simplified version of the final formula, for explanatory purposes:

=RIGHT("Sector: Industrial Goods",16)

The following is the final formula; in order to improve readability, each parameter is inserted in a new line:

 =RIGHT(
   iferror(
     INDEX(
       IMPORTHTML(
         "http://www.thestreet.com/quote/GE/details/company-profile.html",
          "table",
          3
        ),
        8,
        1
     )
   ),
   16
 )