Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Checking for non blank cells in named range
I have a range, let's call it myRange that's cells B22:B24 in my worksheet.
I need to check that these cells are all not blank before doing something else. I'm not sure how to write the code to check that all are non-blank. Any suggestions? Thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Checking for non blank cells in named range
Here you go
Sub FindBlank() Dim MyRange, mcell As Range 'Set your range to whatever you want Set MyRange = Range("B22:B24") For Each mcell In MyRange If mcell.Value = Empty Then MsgBox "You have blank cells in Range - " _ & MyRange.Address(False, False) Exit Sub End If Next MsgBox "You have NO blank cells in Range - " _ & MyRange.Address(False, False) ' the rest of your code here End Sub Sandy Barb Reinhardt wrote: I have a range, let's call it myRange that's cells B22:B24 in my worksheet. I need to check that these cells are all not blank before doing something else. I'm not sure how to write the code to check that all are non-blank. Any suggestions? Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Ignore blank cells in a named range when using dependent data validation | Excel Discussion (Misc queries) | |||
Checking a cell against a named range | Excel Worksheet Functions | |||
Dynamic Named Range with blank cells | Excel Discussion (Misc queries) | |||
Blank cells in named range- how to ignore them when making my graph? Help plz! | Excel Discussion (Misc queries) | |||
Checking for all blank cells in a range orcolumn. | Excel Programming |