vb.net - Clear contents in Cells based on String/empty cell -



vb.net - Clear contents in Cells based on String/empty cell -

i trying clear cell contents if find "na" cell value or if cell blank.

example looks this:

rep intakes var plan cal rep intakes deed cal rep intakes na 373.00 na 8.00 371.00 374.00 23.00 379.00 358.00 69.00 398.00 -18.00 175.00 148.00 11.00 na 252.00

my numeric column start e ara want write vb code looks @ given column range , checks each cell check whether empty or "na". in both cases should clear cell.

try this:

sub nakiller() dim r range, v string each r in activesheet.usedrange v = r.text if v = "na" or v = "" r.clear end if next r end sub

vb.net excel

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -