Sum variants of same cell - Attention Web Analysts

doug firr

Board Regular
Joined
Mar 28, 2011
Messages
140
Any ideas on a smart way to do the following are appreciated. I'm a web analyst and have a sheet with a list of pages.

On this list there are variants of the same page - www and non www, .asp , /index etc etc.

If there were only 10 or so pages I could just manually sum the matching pages but there are hundreds of pages, each with a variant www VS non www etc.

Any ideas on how to approach?

cheers
Paul
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Hi Robert

To be more specific I have a spreadsheet with a list of URLs and the number of visits to each URL. There are hundreds of urls but some of them are variants of the same page.

The home page, for example, appears on numerous rows due to the variants:

www.companyname.com
companyname.com
www.companyname.com/index
companyname.com/index
http://www.companyname.com
etc
etc

These are all the same page, I believe the term is a "cononical issue".

So thats for one page. There are also variants for example of the products page:

www.companyname.com/products
companyname.com/products

So there is a column with all these page names and in the column next to it there are the number of visits to each page.

For the example above to get the correct number of visits to the products page I'd have to add the visits for both the www and non www variants of the page.

It'd be easy if there was just ten or so pages but there are hundreds of pages each with variants.

Any ideas? Do I have to bite the bullit and write up a long formula?
 
Upvote 0
Hi Robert

To be more specific I have a spreadsheet with a list of URLs and the number of visits to each URL. There are hundreds of urls but some of them are variants of the same page.

The home page, for example, appears on numerous rows due to the variants:

www.companyname.com
companyname.com
www.companyname.com/index
companyname.com/index
http://www.companyname.com
etc
etc

These are all the same page, I believe the term is a "cononical issue".

So thats for one page. There are also variants for example of the products page:

www.companyname.com/products
companyname.com/products

So there is a column with all these page names and in the column next to it there are the number of visits to each page.

For the example above to get the correct number of visits to the products page I'd have to add the visits for both the www and non www variants of the page.

It'd be easy if there was just ten or so pages but there are hundreds of pages each with variants.

Any ideas? Do I have to bite the bullit and write up a long formula?
Try something like this...

Book1
AB
1www.companyname.com64
2companyname.com18
3www.companyname.com/index11
4companyname.com/index90
5http://www.companyname.com67
6
7
8
9Sum for:
10companyname250
11
12Formula entered in B10:
13=SUMIF(A1:A5,"*"&A10&"*",B1:B5)
Sheet1
 
Upvote 0
And to extract the company name use:

=MID(A2,FIND(".",A2)+1, FIND("@",SUBSTITUTE(A2,".","@",2))-FIND(".",A2)-1)
 
Upvote 0
And to extract the company name use:

=MID(A2,FIND(".",A2)+1, FIND("@",SUBSTITUTE(A2,".","@",2))-FIND(".",A2)-1)
If you check you will find that does not work on all the samples as quoted in post #3 and shown in the screen shot in post #4. ;)
 
Upvote 0
Hi Peter,
You are absoluelu right and thank you for pointing this out.

Here is my solution:

=IF(ISNUMBER(FIND("www",A1)),MID(A1,FIND(".",A1)+1, FIND("@",SUBSTITUTE(A1,".","@",2))-FIND(".",A1)-1),LEFT(A1,FIND(".",A1)-1))
 
Upvote 0

Forum statistics

Threads
1,224,525
Messages
6,179,317
Members
452,905
Latest member
deadwings

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top