View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
Claus Busch Claus Busch is offline
external usenet poster
 
Posts: 3,872
Default Code for multiple select of cells

Hi Howard,

Am Sun, 26 Oct 2014 14:38:35 -0700 (PDT) schrieb L. Howard:

How would you "select" all the cells on a sheet (.used range I suppose) of an input box entry.


another suggestion:

Sub MultiSelect()
Dim rngBig As Range, rngC As Range

For Each rngC In ActiveSheet.UsedRange
If rngC.Value = 5 And rngBig Is Nothing Then
Set rngBig = rngC
ElseIf rngC = 5 And Not rngBig Is Nothing Then
Set rngBig = Union(rngBig, rngC)
End If
Next
rngBig.Select

End Sub


Regards
Claus B.
--
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional