Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I am trying to create a macro that finds, on a worksheet, all cells with a given value, for example "a", and then selects them. ANy ideas?? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
A variation of this was posted recently:
Sub buildrange() Dim rng As Range Dim cell As Range Set rng = Nothing For Each cell In ActiveSheet.UsedRange If cell.Value = "a" Then If rng Is Nothing Then Set rng = cell Else Set rng = Union(rng, cell) End If End If Next cell If Not rng Is Nothing Then rng.Select End If End Sub -- Gary's Student "Giz" wrote: Hi, I am trying to create a macro that finds, on a worksheet, all cells with a given value, for example "a", and then selects them. ANy ideas?? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Up down arrow keys do not select cells if select locked cells unch | Excel Discussion (Misc queries) | |||
Macro to select cells without a certain value and select a menu it | Excel Worksheet Functions | |||
find and Select cells | Excel Discussion (Misc queries) | |||
how do you "select locked cells" w/o "select unlocked cells"? | Excel Discussion (Misc queries) | |||
How select/define cells with FIND method (maybe together with SpecialCells) | Excel Programming |