Hi!
I have a macros that loops through and gets a list of distinct values from a certain column...I wrote the code not anticipating blanks in my data...now I have come across a time when I need to ignore the blanks if they are there...any help?
I have a macros that loops through and gets a list of distinct values from a certain column...I wrote the code not anticipating blanks in my data...now I have come across a time when I need to ignore the blanks if they are there...any help?
Code:
nrow = 0 'reset nrow for use below
For r = 2 To datarow 'loops down the data sheet
If wf.CountIf(ws_drill_value2.Range("A1:A1000"), ws_data.Cells(r, ncol).Value) = 0 Then
nrow = nrow + 1 'counter for a new name
ws_drill_value2.Cells(nrow, 1).Value = ws_data.Cells(r, ncol).Value
End If
Next r