Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
For each Next Loop
Hi,
this is my first time trying out the ...for..each..next loop I'm trying to delete the entire row if the cell in the E column contains the word "USD". I tried the codes below and get "run time error 424, Object require" error. Any help would be very much appreciated. Sub deleteUSD() Dim rng As Range myrange = Range("E8:E500") For Each rng In myrange If rng.Value = "USD" Then rng.EntireRow.Delete End If Next rng End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
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 | |||
How do I create a For loop within a For loop? | Excel Programming | |||
HELP!!!! Can't stop a loop (NOT an infinite loop) | Excel Programming |