View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
JMay JMay is offline
external usenet poster
 
Posts: 422
Default Coding help needed

Thanks Bob for the explanation - it has added to my
<<sorely-neededunderstanding of programming (which is fairly new to me).
JMay

"Bob Phillips" wrote in message
...

"JMay" wrote in message
news:5SuLb.70602$hf1.69573@lakeread06...
I can't get the portion of below code **"test and provide for blank

cells"
**
to work properly. Can someone assist?
TIA,


' test and provide for blank cells
If rCell.Value = "" Then
msg = Replace(msg, rCell.Value, "The Cell is Blank")
End If


You are trying to replace nothing with something. Nothing is nothing, so

it
won't be found, therefore you cannot replace it. Just use this code

' test and provide for blank cells
If rCell.Value = "" Then
msg = msg & "The Cell is Blank"
End If


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)