Consulting

Results 1 to 4 of 4

Thread: Count the number of cells in a row that are not empty

  1. #1

    Count the number of cells in a row that are not empty

    I am looking for code that will count the number of cells in a row starting from Cell C1 from left to right that are not empty.


    Thankx

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Quote Originally Posted by crmpicco
    I am looking fot code that will count the number of cells in a row starting from Cell C1 from left to right that are not empty.
    =COUNTA(3:3)

  3. #3
    how do i do that with VBA?

  4. #4
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Quote Originally Posted by crmpicco
    how do i do that with VBA?
    myVar = Application.CountA(Rows("3:3"))

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •