Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
loop with array
The following code pops up my msg box... meaning it doesn't find what I am
looking for. Any ideas why? Thanks for the help. John Dim rngToSearch As Range Dim wks As Worksheet Dim rngFound As Range Dim DestCell As Range Application.ScreenUpdating = False Application.Calculation = xlCalculationManual Set wks = Sheets("data") Set rngToSearch = Range("j7:j712") Set rngFound = rngToSearch.Find(what:=Array(Range("d1").Value, Range("d2").Value, Range("d3").Value, Range("d4").Value), LookIn:=xlValues, lookat:=xlWhole) If rngFound Is Nothing Then Range("a6").Select MsgBox "No new Floaters" Else Do With Worksheets("vlookup") Set DestCell = Range("a800").End(xlDown).Offset(1, 0) End With rngFound.EntireRow.Copy _ Destination:=DestCell Set rngFound = rngToSearch.FindNext Loop Until rngFound Is Nothing End If Application.ScreenUpdating = True Application.Calculation = xlCalculationAutomatic Sheets("data").Select Range("a6").Select End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Using Loop to create Array | Excel Programming | |||
Loop through array of worksheets | Excel Programming | |||
Help with Loop / Array / Ranges | Excel Programming | |||
Assign Results from If...Then and Loop to an Array (VBA) | Excel Programming | |||
Help -- Loop or Array? How to identify? | Excel Programming |