Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Msgbox experts please reply..
hi..
Is it possible to have A msgbox that referes to all blank cells in a sellected range ? something like : "the cell(s) A1,B9,F12,... are blank." How can I refer to a probable blank cell range in the msgbox ? please help.. |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Msgbox experts please reply..
I am not an expert, but look at this small macro:
Sub Macro1() Dim r As Range Dim rr As Range For Each r In Selection If IsEmpty(r.Value) Then If rr Is Nothing Then Set rr = r Else Set rr = Union(rr, r) End If End If Next MsgBox ("empty cells: " & rr.Address) End Sub It looks thru Selection for empty cells and builds a range of them. It then displays the address associated with that range. -- Gary's Student "sally" wrote: hi.. Is it possible to have A msgbox that referes to all blank cells in a sellected range ? something like : "the cell(s) A1,B9,F12,... are blank." How can I refer to a probable blank cell range in the msgbox ? please help.. |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Msgbox experts please reply..
msgbox "The cells " &
activesheet.usedrange.specialcells(xlcelltypeblank s).address & " are all blank -- HTH Bob Phillips (remove nothere from email address if mailing direct) "sally" wrote in message oups.com... hi.. Is it possible to have A msgbox that referes to all blank cells in a sellected range ? something like : "the cell(s) A1,B9,F12,... are blank." How can I refer to a probable blank cell range in the msgbox ? please help.. |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Msgbox experts please reply..
On 20 Apr 2006 09:52:47 -0700, "sally" wrote:
hi.. Is it possible to have A msgbox that referes to all blank cells in a sellected range ? something like : "the cell(s) A1,B9,F12,... are blank." How can I refer to a probable blank cell range in the msgbox ? please help.. If it's just a question of referring to that text in a message box then MsgBox "the cell(s) A1,B9,F12,... are blank." will do it. However if you want to identify the names of specific blank cells, then you'd need to write the cell addresses to a string variable Name the Range of cells you're interested in, say A1:F12, as "MyRange" Then run the following macro. The limitation is on the length of the string variable you build up, which I guess is 256 characters. If that's likely to be the case, then another solution is required, - probably more string variables which are concatenated for the message box. Sub IDBlankCell() Dim stBlankCell As String Dim rMyCell As Range For Each rMyCell In Range("MyRange") If rMyCell = "" Then stBlankCell = stBlankCell & rMyCell.Address(RowAbsolute:=False, CcolumnAbsolute:=False) & ";" Next MsgBox "The cells " & stBlankCell & " are blank." End Sub HTH __ Richard Buttrey Grappenhall, Cheshire, UK __________________________ |
#5
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Msgbox experts please reply..
On Thu, 20 Apr 2006 18:11:59 +0100, "Bob Phillips"
wrote: msgbox "The cells " & activesheet.usedrange.specialcells(xlcelltypeblan ks).address & " are all blank Brilliant Bob. Why can I never see the simple answer, and overcomplicate things. Rgds __ Richard Buttrey Grappenhall, Cheshire, UK __________________________ |
#6
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Msgbox experts please reply..
Thanks Gary's Student
You are an expert.. |
#7
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Msgbox experts please reply..
Thanks a lot Bob
It's amazing how some combinations can save us time and effort Thanks again |
#8
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Msgbox experts please reply..
Thanks Richard
The great thing about your sub is the "absolute" parts. They somehow get rid of $ signs in the msgbox. |
#9
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Msgbox experts please reply..
MsgBox "The cells " & _
ActiveSheet.UsedRange.SpecialCells(xlCellTypeBlank s).Address(False, False) & _ " are all blank" -- HTH Bob Phillips (remove nothere from email address if mailing direct) "sally" wrote in message ps.com... Thanks Richard The great thing about your sub is the "absolute" parts. They somehow get rid of $ signs in the msgbox. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Dynamic Range with unused formula messing up x axis on dynamic graph | Charts and Charting in Excel | |||
Need to Improve Code Copying/Pasting Between Workbooks | Excel Discussion (Misc queries) | |||
MsgBox compile error in Excell | Excel Discussion (Misc queries) | |||
To Bob(regarding drop downs)- Pls reply | Excel Discussion (Misc queries) | |||
Msgbox | Excel Worksheet Functions |