+ Reply to Thread
Results 1 to 2 of 2

Get non-empty cells count and index for some column in 3 worksheets?

  1. #1
    Registered User
    Join Date
    11-22-2013
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    1

    Get non-empty cells count and index for some column in 3 worksheets?

    Hi Folks:
    How should I do this:
    Coding in ThisWorkbook to count how many non-empty cells, as well as the index/position of the non-empty cells, for column D in worksheet1, workshet2, and worksheet3? Returning three integers, N1, N2, and N3 as count of non-empty, and another three integer array I1, I2, and I3, as index array;

    For example:

    Sheet1 collumn D

    1
    empty
    2
    empty
    1
    empty
    2
    3
    1

    The function should return N1 = 6, and I1 = [1 3 5 7 8 9] (assuming 1 based indexing); Thanks a lot!

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,653

    Re: Get non-empty cells count and index for some column in 3 worksheets?

    Try something like this.

    The three sheet counts are in the N array; N(1), N(2), N(3)
    The three row arrays are in the I array (an array of arrays); I(1), I(2), I(3)

    Please Login or Register  to view this content.
    Last edited by AlphaFrog; 11-22-2013 at 09:08 PM.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

+ 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] Show only no empty cells from big array - INDEX FUNCTION
    By jakg88 in forum Excel Formulas & Functions
    Replies: 23
    Last Post: 11-03-2013, 06:35 AM
  2. Replies: 2
    Last Post: 07-25-2013, 01:01 PM
  3. Count column C if not empty
    By mbqc in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-30-2007, 11:52 PM
  4. count for empty cells
    By tikchye_oldLearner57 in forum Excel General
    Replies: 6
    Last Post: 05-25-2006, 03:45 PM

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