Search code examples
if-statementgoogle-sheetsimportgoogle-sheets-formulasubstitution

Importing text in Google Sheets using Importhtml


What should be changed to allow the IMPORTHTML to retrieve a text value?

I get this error message; "Function MULTIPLY parameter 1 expects number values. But "Distribution Rate" is a text and cannot be coerced to a number."

=if(isblank($A17),"",(substitute(index(importhtml("https://www.cefconnect.com/fund/"&A17,"table",2),2,1),"*",""))*1)

Solution

  • use:

    =IF(ISBLANK($A17),,(SUBSTITUTE(INDEX(IMPORTHTML(
     "https://www.cefconnect.com/fund/"&A17, "table", 2), 2, 1), "*", )))