Excel/macro Formula Problem!

N

nic17

Help!!

I have created a macro and i am trying to pull all the rows from m
data source where in one field 'incomp' the data does not equal blank.
I know its simple, but i cannot figure it out!

I have tried <>" " and i have tried !=" " but neither work!

Can anyone help?
 
D

Dave Peterson

You may want to use:

with activesheet
if trim(.cells(irow,"B").value) <> "" then

Another option if you're looping through all the rows is to use
Data|Filter|autofilter. Filter on non-blanks.

Record a macro when you do it and you'll have the starting code.
 
Top