+ Reply to Thread
Results 1 to 5 of 5

vba to count specific items in listbox

  1. #1
    Valued Forum Contributor
    Join Date
    11-27-2013
    Location
    Brooklyn, NY
    MS-Off Ver
    Office 365
    Posts
    1,172

    vba to count specific items in listbox

    Hello,
    Looking for help with a code to get the number of all items in a listbox where the 5th column is nothing:
    Please Login or Register  to view this content.
    Thanks in advance.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: vba to count specific items in listbox

    Perhaps.
    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

  3. #3
    Valued Forum Contributor
    Join Date
    11-27-2013
    Location
    Brooklyn, NY
    MS-Off Ver
    Office 365
    Posts
    1,172

    Re: vba to count specific items in listbox

    Hi Norie,
    That works but why does 4 refer to the fifth column?

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

    Re: vba to count specific items in listbox

    As for listbox's rows begin with 0 so row 1 is row 0 and so on
    The same with columns the first column is column 0 / The second column is column 1 and so on
    And column 4 mean column 5

    That's it is zero based ...
    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

  5. #5
    Valued Forum Contributor
    Join Date
    11-27-2013
    Location
    Brooklyn, NY
    MS-Off Ver
    Office 365
    Posts
    1,172

    Re: vba to count specific items in listbox

    Quote Originally Posted by YasserKhalil View Post
    As for listbox's rows begin with 0 so row 1 is row 0 and so on
    The same with columns the first column is column 0 / The second column is column 1 and so on
    And column 4 mean column 5

    That's it is zero based ...
    Thank you for that, very helpful

+ 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 in Listbox
    By Mike_e in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-26-2017, 02:12 AM
  2. How to count # of items followed by a specific value in a column?
    By mlevin77 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-01-2015, 06:01 AM
  3. [SOLVED] Form items chosen in Listbox to populate specific cells in spreadsheet
    By floydian in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-14-2013, 07:48 AM
  4. [SOLVED] Auto select items in a Listbox with items from another Listbox
    By perducci in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 05-22-2013, 04:45 PM
  5. Transfer random listbox items to new listbox and then loop through selected items
    By narrowgate88 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-31-2013, 05:58 PM
  6. Count if the row includes two specific items
    By tabfri in forum Excel General
    Replies: 7
    Last Post: 11-29-2012, 04:03 PM
  7. [[2003] From specific sheet range into listbox items?
    By jobro in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-24-2008, 05:20 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