Sunday, 15 March 2015

Difficulty working with ranges and native Excel formulas in VBA -



Difficulty working with ranges and native Excel formulas in VBA -

i have decent sized worksheet , want delete/clear contents of empty cells. don't have space or character can see (len() returns zero) , they're beingness counted counta.

here's macro i've developed, it's supposed clear contents of each cell in selection has length of zero:

sub nonull() dim rcell range dim ilen integer each rcell in selection ilen = worksheetfunction.len(range(rcell)) if ilen = 0 rcell.clearcontents next rcell end sub

i error on line:

ilen = worksheetfunction.len(range(rcell))

i assume it's related way input rcell len formula.

you close:

sub nonull() dim rcell range dim ilen integer each rcell in selection ilen = len(rcell) if ilen = 0 rcell.clearcontents next rcell end sub

excel vba excel-vba

No comments:

Post a Comment