Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I want find with macro if a range of cells is empty or has at least one
value (Example: range("A5:c30") ) |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Here is one way to do it, if you only need to know if all cells in the
rangfe are empty or at least one cell is not enmpty: Sub EmptyRange() For Each c In ActiveWorkbook.ActiveSheet.Range("a5:c30").Cells If Not IsEmpty(c) Then MsgBox "At least one cell: " & c.Address & " in the range contains data", vbonkonly + vbInformation Exit Sub End If Next c MsgBox "All cells within range are empty", vbOKOnly + vbInformation End Sub Jan "GUS" skrev i en meddelelse ... I want find with macro if a range of cells is empty or has at least one value (Example: range("A5:c30") ) |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Save hard processing!
If WorksheetFunction.CountA(Plan1.Range("A5:C30")) = Empty Then .... End If "GUS" escreveu na mensagem ... I want find with macro if a range of cells is empty or has at least one value (Example: range("A5:c30") ) --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.528 / Virus Database: 324 - Release Date: 16/10/2003 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Test if the range is empty | Excel Discussion (Misc queries) | |||
Check for empty range in vba | Excel Discussion (Misc queries) | |||
why is range empty? | Excel Discussion (Misc queries) | |||
empty variable range | Excel Discussion (Misc queries) | |||
sum next two non-empty cells in a range | Excel Worksheet Functions |