Consulting

Results 1 to 2 of 2

Thread: Using Countif iterating thru rows in a sheet

  1. #1
    VBAX Newbie
    Joined
    Oct 2017
    Posts
    1
    Location

    Question Using Countif iterating thru rows in a sheet

    Hello

    I have a WB with 4 sheets. I populate sheet 4 with integer values. each row (80 rows) has different amount of columns and they all have trailing zero value cells up to column 175. For example row 10 may have integer values up to column 100 and it will then have zeros in columns 101-175.
    What I am trying to do is using Countif I need to get the number of non-zero values in each row.
    I've placed the countif in a for I=1 to 80 loop but I can't seem to get it working. Also, if I run the macro from sheet 1, do I need to activate or select sheet 4 in order to specify ranges in sheet 4 for the countif?

    I appreciate any help you can provide

    Thank you

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Show us the code you have tried.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

Posting Permissions

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