Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
below refuse to work. My objective is to search for 89001/43 in column A. if
my search enters run time error the if block will be executed. Inside the Do block i want the 1st cell in column A that contain any value within the range specified in the do block to be selected Dim OtherBank As Variant Const OBStart As Variant = "89000/41" Const OBEnd As Variant = "89999/43" Columns("A:A").Select ' Find Other Bank and Cash On Error Resume Next Selection.Find(What:="89001/41", After:=ActiveCell, LookIn:=xlFormulas, _ LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _ MatchCase:=False, SearchFormat:=False).Select If ActiveCell < "89001/41" Then OtherBank = Val(Selection.Value) Range("A2").Select Do While OtherBank < OBStart Or OtherBank OBEnd Selection.Offset(1, 0).Select OtherBank = Val(Selection.Value) Loop End If Selection.EntireRow.Insert |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
For Each ... Next loop - need to reference the loop variable | Excel Programming | |||
Advancing outer Loop Based on criteria of inner loop | Excel Programming | |||
Loop Function unable to loop | Excel Programming | |||
Problem adding charts using Do-Loop Until loop | Excel Programming | |||
HELP!!!! Can't stop a loop (NOT an infinite loop) | Excel Programming |