View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Pete[_25_] Pete[_25_] is offline
external usenet poster
 
Posts: 16
Default Select a range not equal to:

Thanks once again James.

Can the macro select the range instead of identifying it? Don't need the message box (The range, however identified and displayed the correct cells.)

Pete

On Thursday, June 28, 2012 2:31:41 PM UTC-5, James Ravenswood wrote:
How about:


Sub NotBlanks()
Dim rA As Range, rSmaller As Range
Set rA = Range("P54:P68")
For L = 68 To 54 Step -1
If Cells(L, "P").Value < "" Then
Exit For
End If
Next
Set rSmaller = Range("P54:P" & L)
MsgBox rSmaller.Address
End Sub