ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Checking for all blank cells in a range orcolumn. (https://www.excelbanter.com/excel-programming/333299-checking-all-blank-cells-range-orcolumn.html)

Mikey

Checking for all blank cells in a range orcolumn.
 
How do I check to see if all the cells in a column are blank so I can skip
several lines of code which run a "text to columns" procedure but get hung up
when the cells are all blank. It works fine when there is data in at least 1
cell.

Thanks
--
Mickey

Roman[_4_]

Checking for all blank cells in a range orcolumn.
 
Hi Mikey,
this could meet your requirements:

If Application.CountA(Columns(1)) = 0 then Msgbox "First column is
empty"



All times are GMT +1. The time now is 02:36 PM.

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