Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default 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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 634
Default 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




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default 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




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,393
Default 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




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to SUM entire column, but only when adjacent cell is not empty SteveDJ Excel Worksheet Functions 3 May 7th 10 09:16 PM
How can I test if a cell is empty? Victor Delta Excel Discussion (Misc queries) 10 August 8th 07 11:22 PM
Test if the range is empty dan Excel Discussion (Misc queries) 6 December 21st 06 03:59 PM
Test if Clipboard is empty Tod Excel Programming 1 August 17th 04 05:00 PM
Better way to test for empty Recordset Tod Excel Programming 1 April 2nd 04 05:19 PM


All times are GMT +1. The time now is 03:29 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"