Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a range named "seabassrange" which consists of two nonadjacent rows by ten columns. I want to check the range to ensure there is nothing in it prior to proceeding. The test code below works when the range is only one cell, but when I try to apply it to my desired range, it always tells me there is something in the range, even after I have deleted everything.
1. Could some kind of formatting be at play here 2. Is there another way to accomplish my goal Thank you in advance Fre Sub test( If IsEmpty("SeabassRange") The MsgBox "empty Els MsgBox "not empty End I End Sub |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Actually, your code doesn't work with a single area range. It is only
checking the top first cell. If application.CountA("seabassrang") = 0 then -- Regards, Tom Ogilvy "Fred" wrote in message ... I have a range named "seabassrange" which consists of two nonadjacent rows by ten columns. I want to check the range to ensure there is nothing in it prior to proceeding. The test code below works when the range is only one cell, but when I try to apply it to my desired range, it always tells me there is something in the range, even after I have deleted everything. 1. Could some kind of formatting be at play here? 2. Is there another way to accomplish my goal? Thank you in advance, Fred Sub test() If IsEmpty("SeabassRange") Then MsgBox "empty" Else MsgBox "not empty" End If End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Form If IsEmpty Syntax | Excel Discussion (Misc queries) | |||
isempty | Excel Programming | |||
vba: isempty | Excel Programming | |||
Problem with IsEmpty Function | Excel Programming | |||
IsEmpty and Is Nothinq problems | Excel Programming |