ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macros - How to tell if cells in a column are blank? (https://www.excelbanter.com/excel-programming/276426-macros-how-tell-if-cells-column-blank.html)

Natasha[_2_]

Macros - How to tell if cells in a column are blank?
 
Hi there,

I have a problem that I can't solve and I was wondering if
anyone knows a way of doing this? It's very simple really
but for some reason my VBA manual doesn't deal with
anything like it.

I want to identify where column A contains a null value,
and in each case of a null I want to delete the entire row
that the null occurs in. (At the very least I need to
delete the cells in A through C).

I was also wondering if there is a quick way of
highlighting the area that contains data instead of
highlighing the whole worksheet or the whole column or
row? I would like to do this in both a Macro and in
general if possible as I'm often dealing with data in
1000's of rows so it would be good if I could do something
similar to Ctrl+A rather than tediously finding the bottom
and highlighting up.

Any help is gratefully appreciated.

Cheers, Natasha.

Don Guillett[_4_]

Macros - How to tell if cells in a column are blank?
 
Have a look at specialcells in vba HELP

"Natasha" wrote in message
...
Hi there,

I have a problem that I can't solve and I was wondering if
anyone knows a way of doing this? It's very simple really
but for some reason my VBA manual doesn't deal with
anything like it.

I want to identify where column A contains a null value,
and in each case of a null I want to delete the entire row
that the null occurs in. (At the very least I need to
delete the cells in A through C).

I was also wondering if there is a quick way of
highlighting the area that contains data instead of
highlighing the whole worksheet or the whole column or
row? I would like to do this in both a Macro and in
general if possible as I'm often dealing with data in
1000's of rows so it would be good if I could do something
similar to Ctrl+A rather than tediously finding the bottom
and highlighting up.

Any help is gratefully appreciated.

Cheers, Natasha.




Paul B[_6_]

Macros - How to tell if cells in a column are blank?
 
Natasha, "I want to identify where column A contains a null value" by null
do you mean 0 or blank or both?, as far as selecting a range try crtl+shift+
down arrow and see if this will do what you want

--
Paul B
Always backup your data before trying something new
Using Excel 2000 & 97
Please post any response to the newsgroups so others can benefit from it
** remove news from my email address to reply by email **
"Natasha" wrote in message
...
Hi there,

I have a problem that I can't solve and I was wondering if
anyone knows a way of doing this? It's very simple really
but for some reason my VBA manual doesn't deal with
anything like it.

I want to identify where column A contains a null value,
and in each case of a null I want to delete the entire row
that the null occurs in. (At the very least I need to
delete the cells in A through C).

I was also wondering if there is a quick way of
highlighting the area that contains data instead of
highlighing the whole worksheet or the whole column or
row? I would like to do this in both a Macro and in
general if possible as I'm often dealing with data in
1000's of rows so it would be good if I could do something
similar to Ctrl+A rather than tediously finding the bottom
and highlighting up.

Any help is gratefully appreciated.

Cheers, Natasha.




Alan Beban[_3_]

Macros - How to tell if cells in a column are blank?
 
Paul B wrote:
Natasha, "I want to identify where column A contains a null value" by null
do you mean 0 or blank or both? . . .


Or something else? Some of the possibilities a

#NULL!, Empty, the empty string (i.e., =""), 0, ', a blank space,
Left("A",0)

Alan Beban



All times are GMT +1. The time now is 12:54 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com