Consulting

Results 1 to 5 of 5

Thread: counting data

  1. #1

    counting data

    I am trying to get some form of count feature in a spread shee. It is a column which has up to 1000 entries of postcodes which I need to know how many of each particular postcode is in the list. The actual postcodes can be numerous as well so time consuming at the moment to count individually. Please can you help

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    =COUNTIF(A:A,"postcode")
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    This puts a ) in the field what I needs is for example a field saying
    4 fk1o 1wd
    2 sk13 1ws

    etc.
    So they count the number of all of each postcode as could be maybe 11 of one 2 of aother etc. Its jus such a long list and the data is needed to pass on. I am a complete excel novice so sorry if not explaining myself right

    thx

  4. #4
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Do you already have the list of codes elsewhere on the sporeadsheet?
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  5. #5
    Administrator
    VP-Knowledge Base
    VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    [vba]
    Option Explicit
    Sub Macro1()
    Dim Rng As Range
    Range("A:A").AdvancedFilter Action:=xlFilterCopy, CopyToRange:=Range( _
    "D1"), Unique:=True
    Range("E1") = "Count"
    Range("E1").Font.Bold = True

    Set Rng = Range(Cells(2, 4), Cells(2, 4).End(xlDown)).Offset(, 1)
    Rng.FormulaR1C1 = "=COUNTIF(C[-4],RC[-1])"

    End Sub

    [/vba]
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •