Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Do while loop error....
hello, i am a beginner...Thank you for your help!!
the inner loop was highlighted (compile error), but i don't know what's wrong here ps: i want to map the price in J5:J25 to the corresponding cells in E5:E19... __________________________________________________ _____________________________________ Sub MapPrice() Dim i, j As Integer Dim selection_v, selection_p As Range i = 5 j = 5 selection_v = Range("C5:E19") selection_p = Range("H5:J25") Do While j <= selection_v.Rows.Count + 4 Do While i <= selection_p.Rows.Count + 4 If Range("H" & i).Value & Range("I" & i).Value = Range("C" & j).Value & Range("D" & j).Value Then Range("J" & i).Copy Destination:=Range("E" & j) i = i + 1 Loop If isBlank(Range("E" & j).Value) Then Range("E" & j).Value = "Not found" i = 5 j = j + 1 Loop End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Loop without Do error | Excel Programming | |||
For..Next loop error | Excel Programming | |||
Befuddled with For Next Loop ------ Run - Time Error '13' Type Mismatch Error | Excel Programming | |||
loop error | Excel Programming | |||
loop error | Excel Programming |