Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
One way...
Sub FindMyVal() Dim n&, k&, sz$ ReDim vArray(1 To WorksheetFunction.CountIf(ActiveSheet.UsedRange, 5)) For n = LBound(vArray) To UBound(vArray) With ActiveSheet.UsedRange For k = 1 To .Cells.Count If .Cells(k) = 5 And InStr(sz, .Cells(k).Address) = 0 Then sz = sz & "," & .Cells(k).Address: Exit For End If Next 'k End With 'ActiveSheet.UsedRange Next 'n ' sz = Replace(Mid(sz, 2), ",", ", ") Range(Replace(Mid(sz, 2), ",", ", ")).Select End Sub -- Garry Free usenet access at http://www.eternal-september.org Classic VB Users Regroup! comp.lang.basic.visual.misc microsoft.public.vb.general.discussion |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Select multiple adjacent cells of multiple cells without selecting | New Users to Excel | |||
Select multiple adjacent cells of multiple cells without selecting | Excel Worksheet Functions | |||
Code to select cells with data | Excel Programming | |||
Code to select cells with data | Excel Programming | |||
Why aren't my cells highlighted when I select multiple cells? | Setting up and Configuration of Excel |