Thursday, August 15, 2013

Google Spreadsheet remove a specific character from an array

Question:


( by yogert909 )

I have an array that contains a lot of asterisks that I need to remove.  Is it possible to do this on an array?  
regexreplace and substitute don't work on arrays.  is there a way to loop through each element in an array..?
Thanks


Solution:

Instead of having formula:
=importhtml("http://finance.yahoo.com/q/op?s=SZYM&m=2013-09","table",14)


Try the following formula:
=arrayformula(iferror(value(substitute(importhtml("http://finance.yahoo.com/q/op?s=SZYM&m=2013-09","table",14),"*",""));importhtml("http://finance.yahoo.com/q/op?s=SZYM&m=2013-09","table",14)))



Have a look at the following screenshot:





In the above sheet, I have the following formula in Cell A16:

=arrayformula(iferror(value(substitute(importhtml("http://finance.yahoo.com/q/op?s=SZYM&m=2013-09","table",14),"*",""));importhtml("http://finance.yahoo.com/q/op?s=SZYM&m=2013-09","table",14)))



I hope the above solution will help you, and if you need more help then please do comment below on this blog itself, I will try to help you out.

I also take up private and confidential projects:
If this blog post was helpful to you, and if you think you want to help me too and make my this blog survive then please donate here: http://igoogledrive.blogspot.com/2012/09/donate.html 

Thanks,

1 comment:

  1. Thanks a lot Kishan! I really appreciate your help.

    It looks like you have a really nice blog here too!

    Cheers!
    Adam

    ReplyDelete