Is there a formula that takes the adjacent cell to the top 10 values and deals with identical values?

时间:2019-01-07 13:07:28

标签: excel excel-formula formula presentation

In order to better analyse pages over time for SEO optimisations and rankings, I've made an excel spreadsheet that pulls in the top 20 pages by impressions and compares it to the top 20 pages by clicks.

I download the report for pages from Google Search Console and copy it into a sheet called PageDataInput. In a sheet called Page it pulls the top 20 pages according to the key metric chosen, either impressions or clicks

The table for impressions works without issue because there aren't any duplicate impressions and there is a low likelihood that there will be. However, this isn't the same with clicks.

Instead of referencing the next page with the same value, it just references the same page with that click for as long as there are duplicate values. Meaning that if there are 5 pages with the same click value, it'll reference the first page 5 times and then move on to the next page.

For Impressions I've used:

=INDEX(PageDataInput!$B$2:$B$952,MATCH(1,INDEX((PageDataInput!$D$2:$D$952=LARGE(PageDataInput!$D$2:$D$952,ROWS(B$2:B2)))*(COUNTIFS(B$2:B2,PageDataInput!$D$2:$D$952)=0),),0))

For Clicks I used the same code just different column to check:

=INDEX(PageDataInput!$B$2:$B$952,MATCH(1,INDEX((PageDataInput!$C$2:$C$952=LARGE(PageDataInput!$C$2:$C$952,ROWS(I$2:I2)))*(COUNTIFS(I$2:I2,PageDataInput!$C$2:$C$952)=0),),0))

The columns are all set correctly.

1 个答案:

答案 0 :(得分:0)

要处理重复的点击次数,您可以创建一个新列,该列会为点击次数增加增量,并引用该列。

最简单的方法是添加一个很小的随机数:

+RAND()/100000

这并不会真正改变结果,但是LARGE函数可以正常工作,因为数字现在基本上是不同的。