View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
John Skewes John Skewes is offline
external usenet poster
 
Posts: 6
Default How to detect when a named cell (range) is Blank in VBA?

Hi Richard,

Have you tried SpecialCells? e.g. (this returns the addresses of blank cells)
Sub WotAboutThis()
MsgBox Cells.SpecialCells(xlCellTypeBlanks).Address(0, 0)
End Sub
--
The major part of getting the right answer lies in asking the right
question...


"Richard" wrote:

I have named cells that are either single cells of ranges.
I need to detect, using VBA, is those named cells are empty or any
value, INCLUDING formulas that would (incidently) return "" !!

I've been scouring google for the answer to no avail :(

So to recap: How can I detect (a true/false is fine) if a named cell
(which can be a range/single cell) is Blank AND it does NOT contain any
formulas (it happends that some Named Cells 'arrays' have formulas that
return "" )

Many thanks for your help!

Richard