Excel help pretty p...
 

  You don't need to be an 'investor' to invest in Singletrack: 6 days left: 95% of target - Find out more

[Closed] Excel help pretty please

11 Posts
7 Users
0 Reactions
123 Views
Posts: 6468
Free Member
Topic starter
 

got a list of postcodes & need to count how many of each postcode group (ie WS13, WS 14) there are.

In column B there is a list of post codes nearly 3000 long, like this

WS13 8QR
WS14 6RP
WS14 9DG
WS14 9EF
WS15 1AE
WS15 1BP
etc

I Want it to return how many WS13, WS14 etc there are, cant get =countif to work as I want.

???


 
Posted : 19/02/2009 4:08 pm
Posts: 251
Full Member
 

split the column on ' ' (space) - it'll make life easier for you.

then sort by prefix and split with a count.


 
Posted : 19/02/2009 4:10 pm
Posts: 0
Free Member
 

you can create an additional column that creates the first part for you by using this formula =LEFT(#CEll#,LEN(#CELL#)-4)

where #cell# is the postcode, you can then run a pivot table to get counts.

The above formula will be able to take into account WS1 etc.

edit: or use the simple method by wwaswas above, doh!


 
Posted : 19/02/2009 4:18 pm
Posts: 6468
Free Member
Topic starter
 

ta


 
Posted : 19/02/2009 4:30 pm
Posts: 10761
Full Member
 

[EDIT]D'oh sorry, was suggesting Countif and then read the last line of the post...


 
Posted : 19/02/2009 4:31 pm
Posts: 145
Free Member
 

Add a new column with =LEFT(A1,FIND(" ",A1)-1)


 
Posted : 19/02/2009 4:33 pm
Posts: 36
Free Member
 

If you dont already have a list of unique postcode stems (WR13, WR14 etc) to do your counting against then you can extract them from your list using:

http://www.cpearson.com/excel/ListFunctions.aspx

and

http://www.cpearson.com/excel/noblanks.htm


 
Posted : 19/02/2009 4:45 pm
Posts: 0
Free Member
 

try this:
Assuming your list of postcodes is in cells B1 to B3000

List your codes that you want to count, the WS13 etc in C1 to say C50

Now in cell D1 enter this function

[code]=COUNTIF($B$1:$B$3000,C1&"*")[/code]

And copy it down next to all of your WS13 etcs

The &"*" in the function is a text wild card so counts anything starting with the text you set as your criteria.


 
Posted : 19/02/2009 6:43 pm
Posts: 6468
Free Member
Topic starter
 

will try that, am I in for a fun morning or what ...


 
Posted : 20/02/2009 9:16 am
Posts: 6468
Free Member
Topic starter
 

acjim,it works but includes B11, B12 in the B1s.


 
Posted : 20/02/2009 9:46 am
Posts: 36
Free Member
 

as you say, acjim's shortcut wont work.

Once youve pulled out your "thin" list, then use the countif function to count incidences.


 
Posted : 20/02/2009 9:49 am
Posts: 0
Free Member
 

oh I see, sorry long and very dull day yesterday!


 
Posted : 20/02/2009 9:55 am

6 DAYS LEFT
We are currently at 95% of our target!