Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'd like to find all of the instances of ALT-ENTER on my worksheet and
highlight them. How would I do this? A VBA solution is fine. Thanks, Barb Reinhardt |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub FindAltEnter()
Dim rng As Range, rng1 As Range Set rng = Cells.Find(What:=Chr(10), _ After:=ActiveCell, _ LookIn:=xlFormulas, _ LookAt:=xlPart, _ SearchOrder:=xlByRows, _ SearchDirection:=xlNext, _ MatchCase:=False) If Not rng Is Nothing Then sAddr = rng.Address Do If rng1 Is Nothing Then Set rng1 = rng Else Set rng1 = Union(rng1, rng) End If Set rng = Cells.FindNext(rng) Loop Until rng.Address = sAddr End If If Not rng1 Is Nothing Then rng1.Select Else MsgBox "None found" End If End Sub -- Regards, Tom Ogilvy "Barb Reinhardt" wrote: I'd like to find all of the instances of ALT-ENTER on my worksheet and highlight them. How would I do this? A VBA solution is fine. Thanks, Barb Reinhardt |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Finding Multiple Instances in a List | Excel Worksheet Functions | |||
Finding the total number of instances per year | Excel Worksheet Functions | |||
Finding Character number for ALT-Enter | Excel Worksheet Functions | |||
Finding all instances of an ink color | Excel Discussion (Misc queries) | |||
counting instances of words in a worksheet cell | Excel Discussion (Misc queries) |