# Averageif WILDCARD for website.com AND EXCLUDE website.com.xx

1. ## Averageif WILDCARD for website.com AND EXCLUDE website.com.xx

How do you do an averageif for pages with website.com BUT exclude all website.com.xx pages? I've tried using the formula
Formula:
`Please Login or Register  to view this content.`

but to no avail.

Help - Averageif.xlsx

2. ## Re: Averageif WILDCARD for website.com AND EXCLUDE website.com.xx

Put in F2:

=AVERAGE(IF(LEFT(\$A\$2:\$A\$30,SEARCH("/",\$A\$2:\$A\$30,1)-1)=E2,\$B\$2:\$B\$30))

Array Formula, you need to press CTRL-SHIFT-ENTER button together when implemented the formula...

and copied down to F3...

Cheers

3. ## Re: Averageif WILDCARD for website.com AND EXCLUDE website.com.xx

Here's another possibility.

This array formula** entered in F3 and copied down as needed:

=AVERAGE(IF(LEFT(SUBSTITUTE(A\$2:A\$30,E2,""))="/",B\$2:B\$30))

** array formulas need to be entered using the key
combination of CTRL,SHIFT,ENTER (not just ENTER).
Hold down both the CTRL key and the SHIFT key
then hit ENTER.

There are currently 1 users browsing this thread. (0 members and 1 guests)