Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I need a VBA code to ensure the range to be filled, is empty to begin.
I will select the range, test if the range is empty, then proceed accordingly. Thanks |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() Application.CountA(rngToBeFilled) (you don't need to select the range) -- Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware "dan" wrote in message I need a VBA code to ensure the range to be filled, is empty to begin. I will select the range, test if the range is empty, then proceed accordingly. Thanks |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thank you, Jim
Nice trick. "Jim Cone" wrote in message ... Application.CountA(rngToBeFilled) (you don't need to select the range) -- Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware "dan" wrote in message I need a VBA code to ensure the range to be filled, is empty to begin. I will select the range, test if the range is empty, then proceed accordingly. Thanks |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Jim - I opened a new workbook - made no entries into sheet1 (the
activesheet).. From the immediate Window I entered: set rng = Activesheet.Range("G1:G5") ? rng.address $G$1:$G$5 ? isempty(rng) FALSE << WHY??? TIA, Jim "Jim Cone" wrote in message : Application.CountA(rngToBeFilled) (you don't need to select the range) -- Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware "dan" wrote in message I need a VBA code to ensure the range to be filled, is empty to begin. I will select the range, test if the range is empty, then proceed accordingly. Thanks |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I would say you are asking it to do something beyond its
design specs. I can't give you the technical explanation, but the help file says IsEmpty only works on Variant variables. The fact that it works on single cells is just a nice bonus. For what it's worth, I usually use Len to check a single cell. -- Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware "JMay" wrote in message Jim - I opened a new workbook - made no entries into sheet1 (the activesheet).. From the immediate Window I entered: set rng = Activesheet.Range("G1:G5") ? rng.address $G$1:$G$5 ? isempty(rng) FALSE << WHY??? TIA, Jim "Jim Cone" wrote in message Application.CountA(rngToBeFilled) (you don't need to select the range) -- Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware "dan" wrote in message I need a VBA code to ensure the range to be filled, is empty to begin. I will select the range, test if the range is empty, then proceed accordingly. Thanks |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thanks for your help.
Jim also "Jim Cone" wrote in message : I would say you are asking it to do something beyond its design specs. I can't give you the technical explanation, but the help file says IsEmpty only works on Variant variables. The fact that it works on single cells is just a nice bonus. For what it's worth, I usually use Len to check a single cell. -- Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware "JMay" wrote in message Jim - I opened a new workbook - made no entries into sheet1 (the activesheet).. From the immediate Window I entered: set rng = Activesheet.Range("G1:G5") ? rng.address $G$1:$G$5 ? isempty(rng) FALSE << WHY??? TIA, Jim "Jim Cone" wrote in message Application.CountA(rngToBeFilled) (you don't need to select the range) -- Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware "dan" wrote in message I need a VBA code to ensure the range to be filled, is empty to begin. I will select the range, test if the range is empty, then proceed accordingly. Thanks |
#7
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
isempty(range("a1").value) will work on a single cell.
That's why Jim used application.counta() for multiple cells. JMay wrote: Jim - I opened a new workbook - made no entries into sheet1 (the activesheet).. From the immediate Window I entered: set rng = Activesheet.Range("G1:G5") ? rng.address $G$1:$G$5 ? isempty(rng) FALSE << WHY??? TIA, Jim "Jim Cone" wrote in message : Application.CountA(rngToBeFilled) (you don't need to select the range) -- Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware "dan" wrote in message I need a VBA code to ensure the range to be filled, is empty to begin. I will select the range, test if the range is empty, then proceed accordingly. Thanks -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Dynamic Ranges using non-contiguous cells and dependent on a cell value | Excel Worksheet Functions | |||
Test if CELL is in RANGE | Excel Worksheet Functions | |||
If statement where the logical test is a range that equals a word | Excel Worksheet Functions | |||
Counting empty cells within a range of cells | New Users to Excel | |||
Eliminate empty cells in data range | Excel Discussion (Misc queries) |