+ Reply to Thread
Results 1 to 7 of 7

Counting cells in a table row that have data

  1. #1
    Forum Contributor
    Join Date
    11-17-2004
    MS-Off Ver
    Office 2016
    Posts
    527

    Counting cells in a table row that have data

    I have a table with three columns of varying number of rows of data that I'd like to combine into one other row. I've seen some vba code that will do this quite well with regular rows and columns but I happen to be using an Excel table and I've been unable to find a workable solution. One trouble I've had is counting the rows of data. With regular Excel tabular data it's pretty straightforward but I could find nothing on counting active rows in an Excel table. I'm open to using VBA or formulas in the table.

    It's simply 3 rows of random data of varying length that I'm combining into one...attached is an example worksheet with a table that shows the results I'm trying to achieve.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: Counting cells in a table row that have data

    Hello
    Try this code
    Please Login or Register  to view this content.
    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

  3. #3
    Forum Contributor
    Join Date
    11-17-2004
    MS-Off Ver
    Office 2016
    Posts
    527

    Re: Counting cells in a table row that have data

    Wow, that was great...thanks.

    This worked great on my test tables which had the target columns contiguous. What would need to change if the columns were not in a row? I modified the attachment to be more like my source data.
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    11-17-2004
    MS-Off Ver
    Office 2016
    Posts
    527

    Re: Counting cells in a table row that have data

    ...and could the code use named ranges?

  5. #5
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: Counting cells in a table row that have data

    Try this
    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    11-17-2004
    MS-Off Ver
    Office 2016
    Posts
    527

    Re: Counting cells in a table row that have data

    Phenomenal...thank you very much!

  7. #7
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: Counting cells in a table row that have data

    You're welcome. Glad I can offer some help
    Regards

+ 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. Counting Certain Cells in a Table
    By Natasha88 in forum Excel General
    Replies: 7
    Last Post: 12-10-2015, 07:59 PM
  2. Counting blank cells in a pivot table
    By perkinsl in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 07-16-2015, 04:58 PM
  3. HELP: Counting the number of cells in with values in a large table
    By tyler3135 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-14-2014, 08:32 PM
  4. pivot table counting blank cells in data table
    By nicko54 in forum Excel General
    Replies: 4
    Last Post: 09-23-2008, 11:26 AM
  5. Replies: 2
    Last Post: 09-23-2008, 11:01 AM
  6. counting cells with data without counting duplicates
    By labettis in forum Excel General
    Replies: 2
    Last Post: 11-05-2007, 12:10 PM
  7. [SOLVED] Counting Non-Zero Cells in a Pivot Table
    By Moz in forum Excel General
    Replies: 0
    Last Post: 07-30-2006, 09:00 AM

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