Dump specific elements of an array - Please help

Hello,
I'm hoping you can help.

I'd like to use the KeywordDensity function to take only the top 3 terms in the array and dump them into 3 separate columns. I'd also like to dump the associated term frequency #. When I use this formula

=KeywordDensity(B2,1,5,2)

I only get a single term.

When I try dump =Dump(KeywordDensity(B2,1,5,2)) of course I get the term, frequency #, and density in separate columns but what if I only want the top 3 or 5 terms? How can I get that? And what if I only want the term and the frequency number and not the density %. how could i get that?

Your help would be appreciated.
Thanks
Chris

Hi Chris,

Yes, you can use the Slice function:
http://seotoolsforexcel.com/slice/

As you can see below, I used "3" in the third parameter which means only the first three rows of the array are returned:

Perfect. thank you very much for your help.

Hi - I finally had a chance to try this out and for some reason, I can't get it to work.
Can you possibly give me an example with =Dump(Slice(KeywordDensity("http://www.msn.com",3,5,3))) How could I use paramerters to generate only the first row or only the first 2 rows?
Thanks again (in advance :slight_smile: )
Chris

=Dump(Slice(KeywordDensity("http://www.msn.com",3,5,3),0,0,3,0))

The "3,5,3" are the KeywordDensity parameters.

The "0,0,3,0" are the Slice parameters. The 3 means take three from the top