VBA Functions Calculations (Blanks, 0's, Text) All in Same Columns

Copper Contributor

Excel VBA -

I have blank cells that need to remain blank

I have cells with the value 0 that need to maintain 0

I have cells with values (i.e. 02, 03, 04, 05, 06, 07, ...55, & QQQQ in the same column(s)) 

Using VBA functions

  1. How do I not included the 'blank' or 'null' rows in functions calculations
  2. How do I ensure execution of calculations on values, for these columns that include text/string values as part of denominator total while not including blank rows in total denominator total. (i.e. denominator for ColumnA needs to determine that it is 5 and not 6)
  3. How do I error check that these columns only contain specific values (i.e. 02 instead of 2) AND any values other than, _____,  _____, ____, ____ are not valid entries.  

 

  Column1 Column2 Column3
Row1 01 04  
Row2 01 999 2
Row3 ^ 05 05
Row4 02 03 ^
Row5   04 QQKK
Row6 01 04 0
0 Replies