ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Message - Selection contains empty cells (https://www.excelbanter.com/excel-programming/346715-message-selection-contains-empty-cells.html)

al007

Message - Selection contains empty cells
 
Hi,
I'm looking for a macro which will pop up a message confirming me that
my selection contains cells with no formulas & no constants i.e are
completely blank.
Thxs beforehand


Peter T

Message - Selection contains empty cells
 
One way -

Sub test()
Dim x As Long
x = Application.CountA(Selection)

MsgBox "Non-blank cells : " & x
End Sub

Regards,
Peter T

"al007" wrote in message
ups.com...
Hi,
I'm looking for a macro which will pop up a message confirming me that
my selection contains cells with no formulas & no constants i.e are
completely blank.
Thxs beforehand




al007

Message - Selection contains empty cells
 
thxs


Peter T wrote:
One way -

Sub test()
Dim x As Long
x = Application.CountA(Selection)

MsgBox "Non-blank cells : " & x
End Sub

Regards,
Peter T

"al007" wrote in message
ups.com...
Hi,
I'm looking for a macro which will pop up a message confirming me that
my selection contains cells with no formulas & no constants i.e are
completely blank.
Thxs beforehand




All times are GMT +1. The time now is 11:13 AM.

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