+ Reply to Thread
Results 1 to 2 of 2

VBA code to count non blank cells in a range

  1. #1
    Registered User
    Join Date
    01-31-2010
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    19

    VBA code to count non blank cells in a range

    I am trying to create VBA code to count the number of cells within a range that have either text or numbers entered in them. This needs to work on a row by row basis, i.e. the same code applied to row 6, 7, 8 onwards.

    I have 12 cells in a row range that are being written into the spreadsheet using another code.

    The activecell is set as a cell in column B

    The 12 cells (labelled 'Deployments') are found in columns AL:AW and are being written using the codes

    Please Login or Register  to view this content.
    to

    Please Login or Register  to view this content.
    How do I create a countif code that is able to reference these values?

    Can post a sample worksheet if it helps. Alternatively, the worksheet can be found under a previous thread

    http://www.excelforum.com/excel-prog...d-working.html

    Thanks
    Last edited by James_B; 03-13-2010 at 02:20 PM.

  2. #2
    Registered User
    Join Date
    01-31-2010
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    19

    Re: VBA code to count non blank cells in a range

    Figured it out eventually!!

    For anyone interested, this is the code that i'm currently using.

    Please Login or Register  to view this content.

+ 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