+ Reply to Thread
Results 1 to 6 of 6

count z in range

  1. #1
    Forum Contributor
    Join Date
    09-09-2014
    Location
    England
    MS-Off Ver
    2013
    Posts
    102

    count z in range

    Hi,

    I am trying to count the number of Z's in my range using vba, with msgbox.

    I have set my range but cannot get the code to count just Z's.

    Any ideas?

    Thank you

    Z

  2. #2
    Forum Contributor S O's Avatar
    Join Date
    06-25-2015
    Location
    England
    MS-Off Ver
    Office 2010 + 2013 + 2016
    Posts
    103

    Re: count z in range

    Why do you need VBA? just use a =COUNTIF() formula

  3. #3
    Forum Contributor
    Join Date
    09-09-2014
    Location
    England
    MS-Off Ver
    2013
    Posts
    102

    Re: count z in range

    I have a VBA code that I am trying to add the countif formula to, to automate the process.

  4. #4
    Forum Contributor S O's Avatar
    Join Date
    06-25-2015
    Location
    England
    MS-Off Ver
    Office 2010 + 2013 + 2016
    Posts
    103

    Re: count z in range

    Please Login or Register  to view this content.
    You can access worksheet functions through the WorksheetFunction class - don't forget to escape your quotation marks though.

  5. #5
    Forum Contributor S O's Avatar
    Join Date
    06-25-2015
    Location
    England
    MS-Off Ver
    Office 2010 + 2013 + 2016
    Posts
    103

    Re: count z in range

    Please Login or Register  to view this content.
    You can access worksheet functions through the WorksheetFunction class - don't forget to escape your quotation marks though.

  6. #6
    Forum Contributor
    Join Date
    09-09-2014
    Location
    England
    MS-Off Ver
    2013
    Posts
    102

    Re: count z in range

    Thanks S O. That works great, with the msgbox.

    Z

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Count items not included in a data validation range sourced from named range
    By L plates in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-10-2015, 01:05 PM
  2. Replies: 15
    Last Post: 06-24-2014, 09:27 AM
  3. [SOLVED] Count number of occurances below a range, within a range, and below a range
    By maacmaac in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-15-2013, 11:36 PM
  4. [SOLVED] Count in a range, where identical adjacent cells count as one instance.
    By the-algebraist in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 02-05-2013, 11:18 AM
  5. Replies: 6
    Last Post: 11-11-2012, 12:40 AM
  6. Range.columns.count property returns wrong count after union operation
    By gopinan in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-13-2008, 04:48 AM
  7. Replies: 25
    Last Post: 09-07-2005, 12:05 AM

Tags for this Thread

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