PDA

View Full Version : Using Countif iterating thru rows in a sheet



Sense2k
10-19-2017, 01:04 PM
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

Bob Phillips
10-20-2017, 02:53 AM
Show us the code you have tried.