ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Is there a test to see if an entire row or column is empty? (https://www.excelbanter.com/excel-programming/324058-there-test-see-if-entire-row-column-empty.html)

Henry Stock

Is there a test to see if an entire row or column is empty?
 
If so, can some one show the code?

--
Henry Stock, Network Administrator
onProject.com
3 Wing Drive
Cedar Knolls, NJ 07927-1006



Ken Wright

Is there a test to see if an entire row or column is empty?
 
Worksheet function -
=COUNTA(A:A)=0

Code -
? application.WorksheetFunction.CountA(sheets("sheet 1").range("A:A"))

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

----------------------------------------------------------------------------
It's easier to beg forgiveness than ask permission :-)
----------------------------------------------------------------------------

"Henry Stock" wrote in message
...
If so, can some one show the code?

--
Henry Stock, Network Administrator
onProject.com
3 Wing Drive
Cedar Knolls, NJ 07927-1006





Ron de Bruin

Is there a test to see if an entire row or column is empty?
 
Hi Henry

Try this for the activecell row

If Application.CountA(Rows(ActiveCell.Row)) = 0 Then _
MsgBox "Row " & ActiveCell.Row & " Is empty"


--
Regards Ron de Bruin
http://www.rondebruin.nl



"Henry Stock" wrote in message ...
If so, can some one show the code?

--
Henry Stock, Network Administrator
onProject.com
3 Wing Drive
Cedar Knolls, NJ 07927-1006





Bernard Liengme

Is there a test to see if an entire row or column is empty?
 
COUNTA(A:A) will return 0 is column A is empty
COUNTA(10:10) will return 0 is row 10 is empty
best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"Henry Stock" wrote in message
...
If so, can some one show the code?

--
Henry Stock, Network Administrator
onProject.com
3 Wing Drive
Cedar Knolls, NJ 07927-1006






All times are GMT +1. The time now is 12:20 AM.

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