+ Reply to Thread
Results 1 to 9 of 9

Count of Text in a column

  1. #1
    Registered User
    Join Date
    05-07-2009
    Location
    Belfast
    MS-Off Ver
    Excel 2003
    Posts
    20

    Count of Text in a column

    Hi guys,

    Re the attached Excel doc, I need to identify changed codes, would someone have a piece of VBA code that creates a count for the data?

    Many thanks in advance!

    T
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor tlafferty's Avatar
    Join Date
    04-08-2011
    Location
    United States, Tacoma, WA
    MS-Off Ver
    Excel 2010, Excel 2013 Customer Preview
    Posts
    1,112

    Re: Count of Text in a column

    sure...
    Please Login or Register  to view this content.
    If your question has been satisfactorily addressed, please consider marking it solved. Click the Thread Tools dropdown and select Mark thread as solved.
    Also, you might want to add to the user's reputation by clicking the star icon in the lower left corner of the post with the answer- it's why we do what we do...

    Thomas Lafferty
    Analyst/Programmer

  3. #3
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: Count of Text in a column

    In the worksheet, use the formula:
    =COUNTIF(A:A,"Code Changed")

    and using VBA:

    Please Login or Register  to view this content.
    Gary's Student

  4. #4
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Count of Text in a column

    This works:

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  5. #5
    Registered User
    Join Date
    05-07-2009
    Location
    Belfast
    MS-Off Ver
    Excel 2003
    Posts
    20

    Re: Count of Text in a column

    Many thanks for the code Thomas, it worked great

    xladept, jakobshavn - thanks for adding your code as well.

    Cheers,
    L

  6. #6
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Count of Text in a column

    You're welcome!

  7. #7
    Registered User
    Join Date
    05-07-2009
    Location
    Belfast
    MS-Off Ver
    Excel 2003
    Posts
    20

    Re: Count of Text in a column

    Hi thomas,

    How would I expand the code to incorporate the unchanged data, and also for a column containing approx 12 pieces of data?

    Many thanks in advance,
    T

  8. #8
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Count of Text in a column

    Hello thompsy,

    Here is one way to do it. Change "A1" to the first cell of the range. The macro will find the last cell in the range automatically. Both counts are tallied and displayed in a message dialog.
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  9. #9
    Registered User
    Join Date
    05-07-2009
    Location
    Belfast
    MS-Off Ver
    Excel 2003
    Posts
    20

    Re: Count of Text in a column

    Hi Leigh, code works great One final question, how do I add a full count of all rows?

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1